Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SOS please help with constraint check with like

Re: SOS please help with constraint check with like

From: juan <toxic_rain_at_hotmail.com>
Date: Sun, 8 Feb 2004 13:30:01 +0100
Message-ID: <c05a49$dbp$1@nsnmrro2-gest.nuria.telefonica-data.net>


CODPOSTAL is declared CHAR(5)

and i want only put numbers in the 5 positions

thank you.

"Ana C. Dent" <anacedent_at_hotmail.com> escribió en el mensaje news:pygVb.36421$P17.13624_at_fed1read03...
> juan wrote:
> > for start i am spanish and my english is not very good, i am sorry for
this.
> >
> > i want made a constraint like this
> >
> > CONSTRAINT "CHECPCP" CHECK(CODPOSTAL LIKE '[0-9][0-9][0-9][0-9][0-9]')
> >
> > this constraint works correctly in SQL Server, but not in oracle.
> >
> > how can i specify a rank like wich i use in SQL Server for oracle?
>
> Your English is better than my Spanish!
>
> If CODPOSTAL is declared to be of type INTEGER,
> then CODPOSTAL > 0 AND CODPOSTAL < 100000 will work.
>
Received on Sun Feb 08 2004 - 06:30:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US