Re: Validating Whole Numbers

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: "Krog, Kenneth" <KAKrog(at)MassMutual(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Validating Whole Numbers
Date: 2002-03-04 22:31:12
Message-ID: 3C83F5B0.58598EB6@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How about:

WHERE x ~ '^[0-9]*$'

"Krog, Kenneth" wrote:
>
> Is there a quick way to validate whole numbers for instance you can validate
> a number
>
> if (is_numeric($x)
> {
> output
> }
> else
> {
> output
> }
>
> Thanks in advance
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2002-03-04 22:50:34 Re: counting words in a text or char varying field
Previous Message Oliver Elphick 2002-03-04 22:30:52 Re: SQL statement : list table details