Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS variables Expand / Collapse
Author
Message
Posted Thursday, July 24, 2014 4:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 7:48 AM
Points: 4, Visits: 92
Greetings :)

I've a one-off task to input a bunch of CSV files and feel ... this is a job for ssis.

There are 121 files named from ab.csv through the alphabet to ze.csv. They all have 19 columns and no headers.
(btw, I would rather not import them all into a single table)

I ran the import-wizard for the first one (and saved it) hoping to modify it do them all.

Trouble is ... a) it created a named table ("dbo.ab"), and used a connection to a named source (c:\CodePoint\ab.csv).

I guess I need to ... loop through a list of 121 text-strings (I'm not proud - I'll paste them into a table if its simplest).
creating tables and import into them individually.

Any advise on how to do this please?

Richard
Post #1595844
Posted Thursday, July 24, 2014 5:45 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 5:50 AM
Points: 4,401, Visits: 11,343
You can use a variable if you have an expression for the relevant property in the connection manager.
Post #1595861
Posted Thursday, July 24, 2014 6:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: 2 days ago @ 7:48 AM
Points: 4, Visits: 92
Good to know
Post #1595864
Posted Thursday, July 24, 2014 6:20 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Monday, August 3, 2015 1:06 AM
Points: 620, Visits: 1,026
Go With For each loop container.

--rhythmk
------------------------------------------------------------------
To post your question use below link

http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1595867
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse