how to fix ora-936 and ora-908 [message #373894] |
Wed, 16 May 2001 10:42 |
yen chew
Messages: 6 Registered: May 2001
|
Junior Member |
|
|
I have been getting an missing expression and missing null key in the statment below. any help from the pros will be greatly appreciated.
select * from dssview.product_events where first_service_start_date >='01-jan-00' and <'01-jan-01' and product_no is 19 or 105 or 1915;
other than that if I run the query how can i export it to a text file or MS access table?
thanks.
|
|
|
Re: how to fix ora-936 and ora-908 [message #373895 is a reply to message #373894] |
Wed, 16 May 2001 12:37 |
Andrew again...
Messages: 270 Registered: July 2000
|
Senior Member |
|
|
select * from dssview.product_events where first_service_start_date >='01-jan-00' and <'01-jan-01' and product_no in (19, 105, 1915);
A further improvement is to explicitly concert datatypes (assumes the table column is DATE).
select * from dssview.product_events where first_service_start_date >=to_date('01-jan-00', 'dd-Mon-rr') and <to_date('01-jan-01', 'dd-Mon-rr') and product_no in (19, 105, 1915);
Remember that the date datatype can contain time. Also the time component in the dates above is at midnight on those dates, so somtimes you need to add 1 day to include that day.
|
|
|
|