﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Integration Services  / To insert varchar records in datetime field / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 00:26:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>It is solved..i made change in the connection stringData Source=&amp;lt;path\xlsx filename&amp;gt;;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES;IMEX=1";Thanks to allRegardsSqlstud</description><pubDate>Fri, 12 Oct 2012 03:04:31 GMT</pubDate><dc:creator>sqlstud</dc:creator></item><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>[quote][b]Phil Parkin (10/11/2012)[/b][hr]Your Excel column is holding mixed datatypes, so you'll need to bring in the column as string and add IMEX=1 to the Excel connection string (Google it for details).[/quote]Thanks Phil...I added IMEX=1 to the connection string..But it displayed the error in OLEDB Source asError: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Src_Product" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.RegardsSqlstud</description><pubDate>Thu, 11 Oct 2012 02:30:48 GMT</pubDate><dc:creator>sqlstud</dc:creator></item><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>Your Excel column is holding mixed datatypes, so you'll need to bring in the column as string and add IMEX=1 to the Excel connection string (Google it for details).</description><pubDate>Thu, 11 Oct 2012 01:12:44 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>[quote][b]sqlstud (10/10/2012)[/b][hr][quote]Well it sort of depends on what you want. You currently have a datetime column but obviously "DECLINED" isn't going to work there. If you want to keep your datetime datatype (which I strongly recommend) then you probably need to make that NULL. If you want to maintain the data exactly as it is excel you will have to change to a varchar column.[/quote]Thanks Sean..I have changed the datatype to Varchar....Please find the attachement.While make a preview in OLEDB Source the data in the date column is displayed as NULL. But in excel sheet, it is "DECLINED".Could you please give me the solution?RegardsSqlStud[/quote]I am with Sean - it's 100 times better to keep your dates in a datetime column and do something else with the DECLINED info - perhaps create another column to hold 'status', or whatever, and use that.</description><pubDate>Thu, 11 Oct 2012 01:10:46 GMT</pubDate><dc:creator>Phil Parkin</dc:creator></item><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>[quote]Well it sort of depends on what you want. You currently have a datetime column but obviously "DECLINED" isn't going to work there. If you want to keep your datetime datatype (which I strongly recommend) then you probably need to make that NULL. If you want to maintain the data exactly as it is excel you will have to change to a varchar column.[/quote]Thanks Sean..I have changed the datatype to Varchar....Please find the attachement.While make a preview in OLEDB Source the data in the date column is displayed as NULL. But in excel sheet, it is "DECLINED".Could you please give me the solution?RegardsSqlStud</description><pubDate>Wed, 10 Oct 2012 23:15:10 GMT</pubDate><dc:creator>sqlstud</dc:creator></item><item><title>RE: To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>[quote][b]sqlstud (10/10/2012)[/b][hr]Hi,I have table "Trial1" One of the columns is DATERECEIVED DATETIME NULLLoading data from Excel to staging table using ssis 2005.Datareceived column contains data as below17/12/201018/12/2011DECLINEDNULLI need to load the data as it is. But thing is that, datatype is datetime..We can modify the column as varchar...But i need to know whether is it possible to load the data whatever present in the excel?RegardsSqlStud[/quote]Well it sort of depends on what you want. You currently have a datetime column but obviously "DECLINED" isn't going to work there. If you want to keep your datetime datatype (which I strongly recommend) then you probably need to make that NULL. If you want to maintain the data exactly as it is excel you will have to change to a varchar column.</description><pubDate>Wed, 10 Oct 2012 08:15:47 GMT</pubDate><dc:creator>Sean Lange</dc:creator></item><item><title>To insert varchar records in datetime field</title><link>http://www.sqlservercentral.com/Forums/Topic1370711-148-1.aspx</link><description>Hi,I have table "Trial1" One of the columns is DATERECEIVED DATETIME NULLLoading data from Excel to staging table using ssis 2005.Datareceived column contains data as below17/12/201018/12/2011DECLINEDNULLI need to load the data as it is. But thing is that, datatype is datetime..We can modify the column as varchar...But i need to know whether is it possible to load the data whatever present in the excel?RegardsSqlStud</description><pubDate>Wed, 10 Oct 2012 00:37:54 GMT</pubDate><dc:creator>sqlstud</dc:creator></item></channel></rss>