Home » RDBMS Server » Server Administration » CHECK CONSTRAINT
CHECK CONSTRAINT [message #53250] Sat, 07 September 2002 02:07 Go to next message
saif ali sabri
Messages: 20
Registered: September 2002
Junior Member
CONSTRAINT trans_dated CHECK (DATED BETWEEN '01-JUL-2002' AND '30-JUN-2003')
what is method to accept this constraint
if datatype is VARCHAR2 then accepted, but insert error
if datatype is DATE then constraint invalid not accepted oracle server.
please told me the proper way to define financial year
Re: CHECK CONSTRAINT [message #53260 is a reply to message #53250] Mon, 09 September 2002 10:36 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
The NLS date format (set in itit.ora) would have to match your date format. The correct way is to specify the date format too in your statement:

CONSTRAINT trans_dated CHECK (DATED BETWEEN to_date('01-JUL-2002', 'dd-mon-yyyy') AND to_date('30-JUN-2003', 'dd-mon-yyyy'))
Previous Topic: enable novalidate
Next Topic: ManagementServer Error
Goto Forum:
  


Current Time: Thu Sep 19 23:02:07 CDT 2024