dbTalk Databases Forums  

Load to Diff Folder

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


Discuss Load to Diff Folder in the microsoft.public.sqlserver.dts forum.



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

Default Load to Diff Folder - 08-13-2003 , 09:22 PM








I need to create a DTS package where I load to different folders(Network
Shares) based upon record selection.

Fields and Sample data:

Customer InvNumber InvDate
--------------------------------
ABC 12345 8/1/03 ===> Record 1
DEF 12345 8/7/03 ===> Record 2


When the extract runs record 1 needs to write to:

\\MyShare\IDABC\Invoice.txt


record 2 needs to write to:

\\MyShare\IDDEF\Invoice.txt


I may not know if the Network share has been created ahead of time. Is this
an ActiveX script ?


any examples would be appreciated.....






Reply With Quote
  #2  
Old   
Andy
 
Posts: n/a

Default Re: Load to Diff Folder - 08-14-2003 , 05:42 PM






I will use the Customer field to determine which folder to send it to.

Can you have multiple (Text Dest) defined but only SELECTIVELY write based
upon my Customer# like....

When I extract records from the table with Customer ABC they write to Text
Dest \\MyShare\IDABC\Invoice.txt

The \\MyShare\ID... SHARE will be created ahead of time before my process
runs....


Does this help explain what I'm trying to do ?











"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
OK

Check the shares up front in an Active Script task (CREATE or NOT as
appropriate)
What criteria do you use for your selection of what goes where ?

If it is every other line then a DataPump task will not do this for you.

If it is based on some criteria i.e. where col1 >= 50 then you can split
the
pumps up into individual pumps and do a qualified SELECT as the source in
each.

You can do this in an Active Script task yes.


--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Andy" <Hoosbruin (AT) Kconline (DOT) com> wrote in message
news:uTJsMsgYDHA.2620 (AT) TK2MSFTNGP09 (DOT) phx.gbl...


I need to create a DTS package where I load to different
folders(Network
Shares) based upon record selection.

Fields and Sample data:

Customer InvNumber InvDate
--------------------------------
ABC 12345 8/1/03 ===> Record 1
DEF 12345 8/7/03 ===> Record 2


When the extract runs record 1 needs to write to:

\\MyShare\IDABC\Invoice.txt


record 2 needs to write to:

\\MyShare\IDDEF\Invoice.txt


I may not know if the Network share has been created ahead of time. Is
this
an ActiveX script ?


any examples would be appreciated.....










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.