sqlstud (10/10/2012)
Hi,I have table "Trial1"
One of the columns is
DATERECEIVED DATETIME NULL
Loading data from Excel to staging table using ssis 2005.
Datareceived column contains data as below
17/12/2010
18/12/2011
DECLINED
NULL
I need to load the data as it is. But thing is that, datatype is datetime..
We can modify the column as varchar...
But i need to know whether is it possible to load the data whatever present in the excel?
Regards
SqlStud
Well it sort of depends on what you want. You currently have a datetime column but obviously "DECLINED" isn't going to work there. If you want to keep your datetime datatype (which I strongly recommend) then you probably need to make that NULL. If you want to maintain the data exactly as it is excel you will have to change to a varchar column.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/