Solved

Populating a SSIS date variable from an Excel date.

Posted on 2006-06-15
3
1,446 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now