| Author |
Topic |
|
SQLNotGoodForME
Starting Member
4 Posts |
Posted - 2009-10-14 : 13:12:58
|
| Hello, i have this question. In a certain table there is a colomn DATE(DD/MM/YYYY)Now i don't know how but it happened in that column there are some valus like 12/06/2009 13:25:20, basically datetime values.What i need is a query to pick all those rows where the colomn DATE has that kind of values. Thanks. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-10-14 : 13:16:15
|
| SELECT * FROM myTable WHERE myDateColumn<>DateAdd(day, DateDiff(day, 0, myDateColumn), 0) |
 |
|
|
SQLNotGoodForME
Starting Member
4 Posts |
Posted - 2009-10-14 : 13:29:51
|
| I forgot to mention, in Oracle SQL |
 |
|
|
SQLNotGoodForME
Starting Member
4 Posts |
Posted - 2009-10-14 : 13:32:10
|
| The DATEADD doens't seems working, not a recognized stat, is there a way to check by lenght? Thanks. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-10-14 : 13:37:31
|
OracleSQLNotGoodForMSSqlServerForum No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-15 : 02:50:37
|
quote: Originally posted by SQLNotGoodForME I forgot to mention, in Oracle SQL
SELECT * FROM myTable WHERE myDateColumn<>to_char('DD-MMM-YYYY',myDateColumn)But it is better you post in Oracle forums such as www.orafaq.comMadhivananFailing to plan is Planning to fail |
 |
|
|
SQLNotGoodForME
Starting Member
4 Posts |
Posted - 2009-10-16 : 05:26:24
|
| It works now. Thanks for support. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-10-16 : 05:45:10
|
quote: Originally posted by SQLNotGoodForME It works now. Thanks for support.
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
|