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: Wednesday, September 24, 2014 3:17 AM
Points: 3, Visits: 76
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
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:16 PM
Points: 2,011, Visits: 5,485
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: Wednesday, September 24, 2014 3:17 AM
Points: 3, Visits: 76
Good to know
Post #1595864
Posted Thursday, July 24, 2014 6:20 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 11:45 PM
Points: 562, Visits: 887
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