Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 SQL bulk upload with date format from .csv file
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

98 Posts

Posted - 08/19/2013 :  05:54:52  Show Profile  Reply with Quote
FROM 'D:\Table1Data.csv'
I try to bulk data from a csv file.

I get below error message:

Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 87 (xxxColumnNamexxx).

The column contain date data (2009/04/03).
I believe it is data format issue to database cannot accept.

May i know how should i upload this data with the right date format.
I prefer not .xml file because the csv file have about 90 column which i need to define all the 90 column and i have about 40 csv file have to bulk upload.

Is there any easier way?

Thank you.

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 08/19/2013 :  06:39:06  Show Profile  Reply with Quote
You've to either user format file or make sure dates have consistent unambiguos format
ALternatively you can use Export Import task/SSIS where you can add logic to cast values to datetime before you transfer it to table

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000