|
-
Originally posted by slimdave
Code:
AND (TO_CHAR(BERTHING.ATB_DTTM, 'MM/DD/YYYY') BETWEEN '10/01/2003' AND '11/30/2003')
This is bad code ... you are comparing strings, not dates, and will not do what you think it will.
Better practice would be ...
Code:
AND BERTHING.ATB_DTTM BETWEEN TO_DATE('10/01/2003','MM/DD/YYYY') AND TO_DATE('11/30/2003','MM/DD/YYYY')
Actually, I did have that. Problem is, for some reason, it misses the end of the month. Eg, the 30th Nov. I'll get records until the 29th.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|