dbTalk Databases Forums  

different folders as source

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss different folders as source in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Flora Pho
 
Posts: n/a

Default different folders as source - 07-19-2005 , 06:12 AM






Hi,

I use to import data from multiple source files but those files are in the
same folder
Now I've got same files (ie. with the same name) but in different folders
And I want to import all of this in the same table
I've got 2 global variables :
- gv_FileLocation
- gv_FileFullName
So for exemple: gv_FileLocation = D:\ftp\Paris
And another folder => D:\ftp\London

How can i switch folder in the same DTS package ?

Rgds
Flora

Reply With Quote
  #2  
Old   
Bill Swartz
 
Posts: n/a

Default Re: different folders as source - 07-19-2005 , 05:13 PM






You'll have to use the Activex Task and loop though the folders and change
the name of the location / file.

Check out this tutorial..

http://www.sqldts.com/default.aspx?246

It shows you how to do the looping and the setting of the file names. (or
folder names in your case)

Bill


"Flora Pho" <FloraPho (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I use to import data from multiple source files but those files are in the
same folder
Now I've got same files (ie. with the same name) but in different folders
And I want to import all of this in the same table
I've got 2 global variables :
- gv_FileLocation
- gv_FileFullName
So for exemple: gv_FileLocation = D:\ftp\Paris
And another folder => D:\ftp\London

How can i switch folder in the same DTS package ?

Rgds
Flora



Reply With Quote
  #3  
Old   
Rick Gittins
 
Posts: n/a

Default Re: different folders as source - 07-19-2005 , 05:28 PM



I have used something like this and it works great.

Rick

"Bill Swartz" <wsaharem (AT) yahoo (DOT) com> wrote

Quote:
You'll have to use the Activex Task and loop though the folders and change
the name of the location / file.

Check out this tutorial..

http://www.sqldts.com/default.aspx?246

It shows you how to do the looping and the setting of the file names. (or
folder names in your case)

Bill


"Flora Pho" <FloraPho (AT) discussions (DOT) microsoft.com> wrote in message
news:3C787544-FA04-4CA2-8E7F-D109CCA281D3 (AT) microsoft (DOT) com...
Hi,

I use to import data from multiple source files but those files are in
the
same folder
Now I've got same files (ie. with the same name) but in different folders
And I want to import all of this in the same table
I've got 2 global variables :
- gv_FileLocation
- gv_FileFullName
So for exemple: gv_FileLocation = D:\ftp\Paris
And another folder => D:\ftp\London

How can i switch folder in the same DTS package ?

Rgds
Flora





Reply With Quote
  #4  
Old   
Flora Pho
 
Posts: n/a

Default Re: different folders as source - 07-20-2005 , 09:37 AM



I already use this package and yes it works very well for multiple files
But I want to imbricate a loop for multiple folders AND for multiple files
Which intance should I use ?
Wich global variables should I create ?
Can you suggest a code that imbricate this 2 loops

Rgds, Flora


"Rick Gittins" wrote:

Quote:
I have used something like this and it works great.

Rick

"Bill Swartz" <wsaharem (AT) yahoo (DOT) com> wrote in message
news:O3nZI8KjFHA.3148 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
You'll have to use the Activex Task and loop though the folders and change
the name of the location / file.

Check out this tutorial..

http://www.sqldts.com/default.aspx?246

It shows you how to do the looping and the setting of the file names. (or
folder names in your case)

Bill


"Flora Pho" <FloraPho (AT) discussions (DOT) microsoft.com> wrote in message
news:3C787544-FA04-4CA2-8E7F-D109CCA281D3 (AT) microsoft (DOT) com...
Hi,

I use to import data from multiple source files but those files are in
the
same folder
Now I've got same files (ie. with the same name) but in different folders
And I want to import all of this in the same table
I've got 2 global variables :
- gv_FileLocation
- gv_FileFullName
So for exemple: gv_FileLocation = D:\ftp\Paris
And another folder => D:\ftp\London

How can i switch folder in the same DTS package ?

Rgds
Flora






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.