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

Home -> Community -> Usenet -> c.d.o.server -> Using BETWEEN '0' AND '9' in table constraint

Using BETWEEN '0' AND '9' in table constraint

From: Steven Moyano <smoyano_at_nwu.edu>
Date: Fri, 05 Jun 98 14:00:45 GMT
Message-ID: <6l8tjm$d2u@news.acns.nwu.edu>

I am trying to limit data entry into a CHAR 9 social security number column to integers. We have not used a NUMBER field since users search on partial social security numbers.

Here is a test table and the error message:

imgntsvr1dosp> CREATE TABLE SPROJ_TRESEARCHERS 2 (

3      RESEARCHER_SSN      CHAR(9)            NOT NULL
4      CONSTRAINT CKC_RESEARCHER_SSN CHECK (BETWEEN '0' AND  '9') 
5 )
..
 15 /
        CONSTRAINT CKC_RESEARCHER_SSN CHECK (BETWEEN '0' AND '9')
                                             *
ERROR at line 4:
ORA-00936: missing expression

Thanks very much for your time and help.

Steven Moyano
Northwestern University, Evanston, IL. USA Steven Moyano <smoyano_at_NWU.EDU> Received on Fri Jun 05 1998 - 09:00:45 CDT

Original text of this message

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