[thelist] bad sql data

Luther, Ron Ron.Luther at hp.com
Mon Nov 28 08:21:02 CST 2005


Ken Schaefer noted:


>>SQL Server doesn't accept invalid dates. 

Hi Ken.  


Right you are!   ;-)

But the assumption there is that Robert is saving his 'date' 
information in a declared "date" field. (Not everybody does that.)

My guess is that Robert may be doing something like saving his 
'date' data as implied dates in a "string" field.  Then, depending 
on how he receives the information from the underlying source 
systems, he really could have an issue with his data.


Robert - Have you confirmed that you really _have_ 'bad' info in 
your db?  We can probably whip up some string transformation magic 
to help you find and correct the worst offenders ... But that 
won't help you differentiate between a 6/7 date and a 7/6 date.

[If you had a separate 'load timestamp' field and could isolate the 
time range the bad data was generated in ... then you could be more 
confident about correcting the bad entries.  As it is, you can 
probably only fix things that might cause your app to break.]


HTH,

RonL.



More information about the thelist mailing list