Solved

Populating a SSIS date variable from an Excel date.

Posted on 2006-06-15
3
1,520 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

707 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