dbTalk Databases Forums  

Multiple output text files based on a query

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


Discuss Multiple output text files based on a query in the microsoft.public.sqlserver.dts forum.



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

Default Multiple output text files based on a query - 06-28-2005 , 08:07 PM






Hi, I am still new to DTS and can't figure out how to do this.

I have a two tables, Game and Game Detail joined by Game_ID, I need to set
up a DTS package where I can export to different text files the Game Detail
information for each game in the Game table. Each Text file will be the Game
detail information for the unique game_id and the files need to be name as
such.

Game_ID = 1 gives game1.txt
Game_ID = 2 gives game2.txt and so on.

Thanks in advance

Tim

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

Default Re: Multiple output text files based on a query - 06-29-2005 , 12:21 AM






OK So you are going to have to involve some kind of loop, dynamic setting of
the SourceSQLStatement and setting of the Filename.

These will help

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)


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


How can I change the filename for a text file connection?
(http://www.sqldts.com/default.aspx?200)


--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Tim Hanson" <Tim Hanson (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi, I am still new to DTS and can't figure out how to do this.

I have a two tables, Game and Game Detail joined by Game_ID, I need to set
up a DTS package where I can export to different text files the Game
Detail
information for each game in the Game table. Each Text file will be the
Game
detail information for the unique game_id and the files need to be name as
such.

Game_ID = 1 gives game1.txt
Game_ID = 2 gives game2.txt and so on.

Thanks in advance

Tim



Reply With Quote
  #3  
Old   
Tim Hanson
 
Posts: n/a

Default Re: Multiple output text files based on a query - 06-30-2005 , 02:23 PM



Thank you Allan, that worked great.

Tim.

"Allan Mitchell" wrote:

Quote:
OK So you are going to have to involve some kind of loop, dynamic setting of
the SourceSQLStatement and setting of the Filename.

These will help

Global Variables and SQL statements in DTS
(http://www.sqldts.com/default.aspx?205)


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


How can I change the filename for a text file connection?
(http://www.sqldts.com/default.aspx?200)


--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Tim Hanson" <Tim Hanson (AT) discussions (DOT) microsoft.com> wrote in message
news:637B5820-1D1C-4396-962E-656A9A969D46 (AT) microsoft (DOT) com...
Hi, I am still new to DTS and can't figure out how to do this.

I have a two tables, Game and Game Detail joined by Game_ID, I need to set
up a DTS package where I can export to different text files the Game
Detail
information for each game in the Game table. Each Text file will be the
Game
detail information for the unique game_id and the files need to be name as
such.

Game_ID = 1 gives game1.txt
Game_ID = 2 gives game2.txt and so on.

Thanks in advance

Tim




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.