| Query where condition has 4 rows in table but result is zero rows [message #569566] |
Mon, 29 October 2012 15:05  |
 |
cplusplus1
Messages: 30 Registered: October 2012 Location: usa
|
Member |
|
|
There are 4 rows in table with stat_flag 'Updated Record' and stat_date with todays date.
stat date has date & time both, for that reason just trying to format with yyyy.mm.dd
I am getting zero rows as result.
where STAT_FLAG = 'Updated Record' and to_date(stat_date,'yyyy.mm.dd') = to_date(sysdate(),'yyyy.mm.dd')
Thanks a lot for the helpful info.
|
|
|
|
|
|
|
|
|
|
| Re: Query where condition has 4 rows in table but result is zero rows [message #569584 is a reply to message #569568] |
Tue, 30 October 2012 00:48  |
 |
Michel Cadot
Messages: 54125 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
cplusplus1 wrote on Mon, 29 October 2012 22:13Hello Michel,
All i am doing is:
select * from tab_DMStat where STAT_FLAG = 'Updated Record' and to_date(stat_date,'yyyy.mm.dd') = to_date(sysdate(),'yyyy.mm.dd')
can you please kindly help with trunc.
Michel Cadot wrote on Mon, 29 October 2012 21:17...
...Before, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals....
All functions are described in Database SQL Reference, please refer to it when we point you to a function instead of waiting for being spoonfed.
Regards
Michel
|
|
|
|