I am using Microsoft Visual Studio 2010 Professional WITH Integration Services. For the management of the database I am using Microsoft SQL SERVER Management Studio 2012.
I have an excel file with several sheets. In some sheets there is a column DATE. I need to import these values to a SQL table.
The problem I'm getting is that the OLE DB Source keeps setting a couple of the excel columns CALLED 'date' to DT_WSTR with a 255 length and not DATE datatype. I've tried to change it to DATE as data type under the EXCEL Source Output in external COLUMNS, and then in the date column... but it keeps to set the excel column as DT_WTSR with 255 (length)...
Below you can see the data of the date column I'm using.
**DATE**
06/jun/16
13/oct/15
n/a
07/jun/16
20/may/13
n/a
n/a
n/a
n/a
n/a
17 Apr 2018
what I'm getting in the SQL Table:
**DATE**
42527
42290
n/a
42528
41414
n/a
n/a
n/a
n/a
n/a
17 Apr 2018
What is desired?
**DATE**
06/06/2016
10/13/2015
n/a
06/07/2016
05/20/2013
n/a
n/a
n/a
n/a
n/a
04/17/2018
IN the TYPEGUESSROWS (using regedit) it is set to 8 (HEX). i'VE TRIED TO change it to 0 or even I gave it a long number and it does not work.
I have also changed the connection string adding several hypothesis for the IMEX=? (I have tried with 1, 2 and 3 where is ?) but to no avail. As you can see there is mixed data types in the column date... I need to keep these values as it appear in LAST example. If I move more rows with dates to the first lines it works, but we cannot change the excel file at all. So how can we keep the values as it presents in the last table I've showed? Thanks!
important: there are much more values n/a than dates... which means even I use a very long TYPEGUESSROWS SSIS will use text... :( it must be a way to get the table I want!
