Solved

Populating a SSIS date variable from an Excel date.

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

839 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