dbTalk Databases Forums  

DTS Need Help

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


Discuss DTS Need Help in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stan Sainte-Rose
 
Posts: n/a

Default DTS Need Help - 01-19-2004 , 08:21 AM






Hi
I still have problems with a DTS package.
I have a Table A, where I have the path file to save the file and the ID
company

I need to generate a csv files from a table B for each ID company using its
Path file.
and this job must be scheduled.

Of course, the goal is to use a unique DTS package, and I suppose I have to
use GlobalVariables.
But.. but I tried many options and they don't work.

Thanks for your help.

Stan







Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Need Help - 01-19-2004 , 08:30 AM






OK

1. You need to loop through a global variable rowset picking up the
Filename and ID
2. You set the SourceSQL Statement of a DataPump task to the correct SQL
Statement filtering on the ID (WHERE col = ID)
3. You set the text file connection DataSource property to the Global
variable retrieved
4. You loop

These two articles will help

Looping, Importing and Archiving
(http://www.sqldts.com/Default.aspx?246)

How to loop through a global variable Rowset
(http://www.sqldts.com/Default.aspx?298)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote

Quote:
Hi
I still have problems with a DTS package.
I have a Table A, where I have the path file to save the file and the ID
company

I need to generate a csv files from a table B for each ID company using
its
Path file.
and this job must be scheduled.

Of course, the goal is to use a unique DTS package, and I suppose I have
to
use GlobalVariables.
But.. but I tried many options and they don't work.

Thanks for your help.

Stan









Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: DTS Need Help - 01-19-2004 , 08:32 AM



This should get you started-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)


--
Darren Green
http://www.sqldts.com

"Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote

Quote:
Hi
I still have problems with a DTS package.
I have a Table A, where I have the path file to save the file and the ID
company

I need to generate a csv files from a table B for each ID company using
its
Path file.
and this job must be scheduled.

Of course, the goal is to use a unique DTS package, and I suppose I have
to
use GlobalVariables.
But.. but I tried many options and they don't work.

Thanks for your help.

Stan









Reply With Quote
  #4  
Old   
Stan Sainte-Rose
 
Posts: n/a

Default Re: DTS Need Help - 01-19-2004 , 09:09 AM



Wowww.. :-)
I thank you for the urls.
For the loop, I used another proc but this one seems very cool.
But I don't know how to create the package for the export section.
I tried to understand the (http://www.sqldts.com/Default.aspx?246) article
but...

Allan gave me some directions with the following proc but I never knew how
to send the parameters (?) and change the destinations directory for the
export file.

SELECT DISTINCT
A_CLIENTS.idclient,
A_CLIENTS.CLICODE,
A_CLIENTS.CLIEMAIL,
FROM A_CLIENTS
WHERE A_CLIENTS.IDSOCIETE= ?
AND LOGDATE< ?

Stan



"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> a écrit dans le
message de news:uTnLmkp3DHA.2888 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
This should get you started-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)


--
Darren Green
http://www.sqldts.com

"Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message
news:OV77cdp3DHA.2280 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi
I still have problems with a DTS package.
I have a Table A, where I have the path file to save the file and the ID
company

I need to generate a csv files from a table B for each ID company using
its
Path file.
and this job must be scheduled.

Of course, the goal is to use a unique DTS package, and I suppose I have
to
use GlobalVariables.
But.. but I tried many options and they don't work.

Thanks for your help.

Stan











Reply With Quote
  #5  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Need Help - 01-19-2004 , 09:43 AM



If you are using SQL Server 2000 then you will have a parameters button on
the Source tab of the datapump. This is where you shoose to map your Global
Variable that you have set from the Rowset so have a look at this article
pages 7 & 8

How to Use Lookups in DTS
(http://www.sqldts.com/default.aspx?277,1)


--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote

Quote:
Wowww.. :-)
I thank you for the urls.
For the loop, I used another proc but this one seems very cool.
But I don't know how to create the package for the export section.
I tried to understand the (http://www.sqldts.com/Default.aspx?246) article
but...

Allan gave me some directions with the following proc but I never knew how
to send the parameters (?) and change the destinations directory for the
export file.

SELECT DISTINCT
A_CLIENTS.idclient,
A_CLIENTS.CLICODE,
A_CLIENTS.CLIEMAIL,
FROM A_CLIENTS
WHERE A_CLIENTS.IDSOCIETE= ?
AND LOGDATE< ?

Stan



"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> a écrit dans
le
message de news:uTnLmkp3DHA.2888 (AT) tk2msftngp13 (DOT) phx.gbl...
This should get you started-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)


--
Darren Green
http://www.sqldts.com

"Stan Sainte-Rose" <stan (AT) cyber972 (DOT) com> wrote in message
news:OV77cdp3DHA.2280 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi
I still have problems with a DTS package.
I have a Table A, where I have the path file to save the file and the
ID
company

I need to generate a csv files from a table B for each ID company
using
its
Path file.
and this job must be scheduled.

Of course, the goal is to use a unique DTS package, and I suppose I
have
to
use GlobalVariables.
But.. but I tried many options and they don't work.

Thanks for your help.

Stan













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.