I have several .csv files and i'm trying to insert them into a database table.
Nothing is getting imported and i get errors like this:
Information: 0x402090df at data flow task, OLE DB Destination….
Error: 0xC0202009 at at data flow task, OLE DB Destination….
All my files are saved from an excel spreadsheet - saved as .csv.
I'm trying to import these into a table varchar(50).
All my data in the single field being inserted into the table are only 7 characters long (uk postcodes) but changed to varchar 50 as it was giving me error about the field not being long enough.
sypa
Member
139 Points
177 Posts
trying to insert several csv files into a db table using a ssis package
Nov 16, 2012 12:08 PM|LINK
I have several .csv files and i'm trying to insert them into a database table.
Nothing is getting imported and i get errors like this:
All my files are saved from an excel spreadsheet - saved as .csv.
I'm trying to import these into a table varchar(50).
All my data in the single field being inserted into the table are only 7 characters long (uk postcodes) but changed to varchar 50 as it was giving me error about the field not being long enough.
Here are 14 screenshots of my table, my data and all my settings:
http://www.sypensions.org.uk/test/test.html
thanks,
mark.
bhaskar.mule
Contributor
2270 Points
659 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 16, 2012 12:21 PM|LINK
hi
refer this one
http://csharpektroncmssql.blogspot.com/2011/11/i-think-this-is-simple-way-to-transfer.html
Site:Rare technical solutions
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 17, 2012 12:39 AM|LINK
Hi,
please try to change to varchar(MAX).
Reguards!
sypa
Member
139 Points
177 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 19, 2012 09:05 AM|LINK
sypa
Member
139 Points
177 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 19, 2012 09:06 AM|LINK
also tried varchar(MAX) - this did not work either, same problem.
css-chlukito
Member
376 Points
48 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 20, 2012 08:48 AM|LINK
Hi sypa,
On screenshot, I saw this line:
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Cannot insert the value NULL into co
I wonder its because your first column "IDNo" not allowed for NULL value. Please try set it to allow NULL values.
Please 'Mark as Answer' if this post helps you.
sypa
Member
139 Points
177 Posts
Re: trying to insert several csv files into a db table using a ssis package
Nov 20, 2012 09:02 AM|LINK
working now thanks.
I didnt think this could be the problem as im not importing it.
I gues i need to increment this field (count) automatically somehow? (rather than it saying NULL for every entry).