Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
moiseszaragoza
Starting Member
8 Posts |
Posted - 2009-06-27 : 21:18:30
|
| Hi, I have been given a legacy DB and i dont know what to do to bring it up to date.Well I have a "DOB" Field that is just wrong. I have 08/22/1983, and 08-22-1983, AND Agu 22, 1983 Just to give a example When I did a SELECT DISTINCT DOB FROM TABLE i got 2000 + Diferent dates. But how can i make all the dates have a standar?Just keep smilingJust keep smiling |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-28 : 00:39:28
|
you need to convert the current varchar values to standard datetimeformat. try the belowSELECT columns...FROM(SELECT CONVERT(datetime,YourField) AS StandardDate,...other fieldsFROM yourtable)tGROUP BY StandardDate |
 |
|
|
|
|
|