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:
As you can see the importer
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
Post a Comment