Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql problem with cast

Status
Not open for further replies.

hilbrink

Programmer
Dec 8, 2000
38
NL
Does anybody have a clue what is wrong with the following SQL statement?
SELECT cast('02-17-2001' AS date) ...rest of statement...

The error message i get is "Key violation. [oracle][odbc][ora]ORA-00905: missing keyword".

Thanx!
 
Try this for size.

SELECT to_date('02-17-2001','dd-mm-yyyy')
...rest of statement.

If it isn't that we'll need the rest of the statement to sort you out...
 
sorry, you're in US date format that should therefore be

SELECT to_date('02-17-2001','mm-dd-yyyy')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top