dbTalk Databases Forums  

Re: Text File with different structures

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


Discuss Re: Text File with different structures in the microsoft.public.sqlserver.dts forum.



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

Default Re: Text File with different structures - 07-22-2004 , 09:42 AM






Thank you for the solution.

Now, imagine that I need a "bookmark" in the beggining and the end of each
table. How to insert it?
Thanks!

Example:

*TABLE1*
1,2,3
2,3,4
*EOF*

*TABLE2*
1,2,3,4
2,3,4,5
*EOF*

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

Quote:
It doesn't matter that the tables have differing structures if you want to
export a query containg columns from each of them..

Do you want the text file to look something like this though

col1, col2.col3
1,2,3
2,3,4
col1,col2,col3,col4
1,2,3,4
4,5,6,7
8,9,8,7
col1,col2,col3,col4,col5
1,2,3,4,5
2,3,4,5,6



For this solution I would pump each table to a seperate text file then use
the DOS COPY command

COPY file1.txt + file2.txt + file3.txt FileAll.txt



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Eduardo Greco" <Eduardo Greco (AT) discussions (DOT) microsoft.com> wrote in message
news:81AE19CF-D053-4F26-AE1F-528BBE1F1574 (AT) microsoft (DOT) com...
I want to create one text file, but the data come from different tables
with different structures. For example, table1 with two fields whereas
table2 has three fields.
How to use DTS to create this single text file.
Thanks for helping...





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

Default Re: Text File with different structures - 07-22-2004 , 11:17 AM






It doesn't matter that the tables have differing structures if you want to
export a query containg columns from each of them..

Do you want the text file to look something like this though

col1, col2.col3
1,2,3
2,3,4
col1,col2,col3,col4
1,2,3,4
4,5,6,7
8,9,8,7
col1,col2,col3,col4,col5
1,2,3,4,5
2,3,4,5,6



For this solution I would pump each table to a seperate text file then use
the DOS COPY command

COPY file1.txt + file2.txt + file3.txt FileAll.txt



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Eduardo Greco" <Eduardo Greco (AT) discussions (DOT) microsoft.com> wrote

Quote:
I want to create one text file, but the data come from different tables
with different structures. For example, table1 with two fields whereas
table2 has three fields.
Quote:
How to use DTS to create this single text file.
Thanks for helping...



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.