Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL statements
"colmkav" <colmjkav_at_yahoo.co.uk> a écrit dans le message de news: 1182877344.598359.81440_at_n2g2000hse.googlegroups.com...
|
| Can anyone explain why when I run the first statement in Oracle XE I
| get lots of records where sourceid = 3 and the riskdate is 18-JUN-07,
| however when I run the 2nd statement I get the result 0 returned?
| Surely I should get no records with a date of 18-jun-07 if the second
| statement returns 0?
|
|
| select * from ta_sma where sourceid = 3 order by riskdate desc
|
| select * from ta_sma where sourceid = 3 and riskdate = '18-jun-07'
|
'18-jun-07' is not a date it is a string.
Regards
Michel Cadot
Received on Tue Jun 26 2007 - 12:11:15 CDT