Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oracle Sql Statement
Message
General information
Forum:
Oracle
Category:
Other
Miscellaneous
Thread ID:
00802182
Message ID:
00820528
Views:
34
No need for TRUNC() function here. The SQL I gave should work just fine.

>wouldn't that be
>
>>SELECT * FROM VOTER ;
>> WHERE
>
>trunc(tdob)
>
> = to_date('12/31/1971', 'MM/DD/YYYY') ;
>> AND cvotstatus = 'A'
>
>?
>
>
>>Since you are just looking for 1 date, 12/13/1971, you could just write your SQL this way:
>>
>>SELECT * FROM VOTER ;
>> WHERE tdob = to_date('12/31/1971', 'MM/DD/YYYY') ;
>> AND cvotstatus = 'A'
>>
>>As for yuor observed performance difference, it is always better to use BETWEEN when a column value needs to be between 2 other values.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform