Importing from Excel to SQL Server: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value -


I have the following Excel workbook:

To import it The formatted server for a SQL database has the following details:

SQL property

As you can see the importer mapping

True when I try to import the excel file, the situation is always the same, does not make any changes, i With Ank do with the column.

242: A

3621: statement has been terminated as a result of a datetime data type conversion of a datetime data type.

What should I modify so that these rows can be imported without error? TEXT , then / p>

'I will see, but I am not sure why you are having this problem, you should strictly import imports from Excel and there are dates kept with you, at least you have the SSIS with the import wizard of SQL You can use.

  = TEXT (F2, "Yyyy-mm-dd")   

I like importing from Excel using OPENROWSET () , but requires some additional setup And its drawbacks are:

  SELECT * from OPERROWSET ('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; Database = C: \ YourExcelFile.xls', [Sheet1 $] )    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -