|
-
unbelieveble!!
Who can explain me this!!
31/06/2003 does not exist ...it's an invalid date.
SQL> select count(*)
2 from sales
3 where dat_sale = '31/06/2003';
where dat_venda = '31/06/2003'
*
ERROR at line 3:
ORA-01843: not a valid month
SQL> select dat_sale, count(*)
2 from sales
3 where dat_inc between to_date('30/06/2003', 'DD/MM/YYYY') AND to_date('01/07/2003', 'DD/MM/YYYY')
4 group by dat_sale
5 /
DAT_VENDA COUNT(*)
--------- ----------
30-APR-03 18310
30-JUN-03 6366
31-JUN-03 175458
SQL> select count(*)
2 from sales
3 where to_char(dat_sale) = '31/06/2003';
COUNT(*)
----------
0
F.
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
|