Solved

Populating a SSIS date variable from an Excel date.

Posted on 2006-06-15
3
1,500 Views
Last Modified: 2012-08-13
Hello,

I'm getting an SSIS error ([Execute SQL Task] Error: An error occurred while assigning a value to variable "StartDate": "Unsupported data type on result set binding Start Date.".) when I try to read an Excel date into an SSIS variable.  The Excel cell is formatted as a date field as is the SSIS variable.  I can import the date (from Excel) into a SQL table with no problems but when I try to get it into the SSIS variable I get the error.

Any help would be appreciated!

Thanks in advance,
Rob
0
Comment
Question by:rkellow
3 Comments
 
LVL 13

Assisted Solution

by:devsolns
devsolns earned 250 total points
ID: 16914561
You could use SSIS and use convert(datetime, <FieldNAme>, 101).

Hope this helps.

--DS
0
 

Author Comment

by:rkellow
ID: 16915676
Hi DS,

Thanks for the reply.  I tried using the Convert funtion and it gave me another error (Undefined function).  I'm trying to use an "Execute SQL Task" to read from an Excel file and put the value in a SSIS variable.  I tried to put the Convert function call into the SQL statement of the Excute SQL task, I'm not sure why I'm getting the Undefined Function error but it is not working.  Any thoughts?

Thanks,
Rob
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 250 total points
ID: 16919649
>>I'm not sure why I'm getting the Undefined Function error but it is not working.  Any thoughts?<<
If you are saying you get this error when you query an Excel spreadsheet, that would be understandable as you cannot use a T-SQL command with Excel.  Try importing the spreadsheet into a SQL Server staging table and you can then do you Execute SQL Task.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question