SQL 2005 importing text field data into a date field
Posted on 2009-04-14
We use a sql as a backend for our reports and every night I have a ssis package which imports the data from our main system into the sql database. The main system for some unknown reason has a date field set as a text field (there is no way to change this) so I have to import the date as a text field which makes running reports more complicated. Also in the text field there are null values and also a vew records have "/ /" in that field, so it is not easy to change it to a date field after it is imported.
Is there a way I can modify the import to say something like "if textdate = null then "01-01-1900" or if textdate = "//" then "01/01/1900"