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

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Help for Importing CSV data file to Table

Author  Topic 

Karna
Starting Member

4 Posts

Posted - 2007-05-30 : 03:31:32
Hi all-

I am in need of some help importing a .CSV file into a SQL Server 2005 Enterprise Edition.
The problem is I already implemented Bulk Insert task in SSIS but it is not importing any data. My detailed layout is as follows :
In SSIS package1 -
In Control Flow Bulk Insert Task has been inserted
Properties of Bulk Insert Task:
Connection adtc009d.ganny
Destination Table ganny.dbo.t4
Format
Format Specify
Row Delimiter {CR}
Column Delimiter Comma{,}
Source Connection
File r.csv
Options
Options Check Constraints
Maxerrors 20

This bulk insert task is connected to Data flow task, if we click edit to data flow task, data flow section will come, here Flat file source & OLE DB Destination is there. Flat file source is connected to OLE DB Destination.

Properties of Flat File
Connection Manager
Flat file connection Manager
here by clicking new link flat file properties to this.
Preview
by clicking preview all data are visible
Properties of OLE DB Destination editor
Oledb connection manager adtc009d.ganny
Data access mode: Table or View - fast load
Name of Table or view dbo.t4

After designing all this then if I start debugging I could able to get records are imported to a table.
Please suggest me where I am going wrong.

Thanks in advance
Karna

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-05-30 : 05:17:28
I'm a bit confused!
quote:
This bulk insert task is connected to Data flow task

Why do you have a data flow task in addition to the bulk insert? Is this just a test (are you saying that this is successfully importing records?), or is it intended as part of your solution?
Does the bulk insert execute successfully? If not, what error message(s) are you getting?

Mark
Go to Top of Page

Karna
Starting Member

4 Posts

Posted - 2007-05-30 : 05:49:04
Hi,

Thanks for your reply. I did a mistake, connecting Bulk Insert to Data flow task, is it possible to get error reports to certain folders & check validations.

How can I use Expression Builder in Bulk Insert Task ?

Please suggest me.

Thanks in advance
Karna
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2007-05-30 : 08:59:54
Hi,
Are you hoping to handle issues in the incoming data? If so, it could be that you'd be better off using a data flow task, and configuring it to redirect rows with issues (i.e. data type conversion, primary key violation).
In order to use the expression builder: double-click the bulk insert task, select 'expressions' in the left-hand pane, click the ellipses (...) to the right of the dialog, choose the property you're interested in and click the ellipses to the right of it to open the expression builder.

Mark

Mark
Go to Top of Page
   

- Advertisement -