Home > Archive > MS SQL Server DTS > July 2005 > different folders as source









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author different folders as source
Flora Pho

2005-07-19, 7:24 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
Bill Swartz

2005-07-19, 8:24 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@discussions
.microsoft.com> wrote in message
news:3C787544-FA04-4CA2-8E7F- D109CCA281D3@microso
ft.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



Rick Gittins

2005-07-19, 8:24 pm

I have used something like this and it works great.

Rick

"Bill Swartz" <wsaharem@yahoo.com> wrote in message
news:O3nZI8KjFHA.3148@TK2MSFTNGP09.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@discussions
.microsoft.com> wrote in message
> news:3C787544-FA04-4CA2-8E7F- D109CCA281D3@microso
ft.com...
>
>



Flora Pho

2005-07-20, 9:23 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:

> I have used something like this and it works great.
>
> Rick
>
> "Bill Swartz" <wsaharem@yahoo.com> wrote in message
> news:O3nZI8KjFHA.3148@TK2MSFTNGP09.phx.gbl...
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com