dbTalk Databases Forums  

Exporting a DTS query as an ASCII File

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


Discuss Exporting a DTS query as an ASCII File in the microsoft.public.sqlserver.dts forum.



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

Default Exporting a DTS query as an ASCII File - 12-10-2006 , 01:17 PM






I am performing a query and an ASCII export within a DTS job.
The conditions have been set for the export as Vertical line (PIPE) as the
delimator and having a hard return at the end of each row. How can I put a
vertical line at the end of each row. I tried forcing a new column with PIPE
but I ended up with two PIPES at the end.

Need the export to look like below:
Harry Smith|123 Main Street|Playstation3|
John Smith|421 Main Street|Playstation3|
Jane Smith|123 Main Street|Playstation3|


Current export without the pipe at the end:
Harry Smith|123 Main Street|Playstation3
John Smith|421 Main Street|Playstation3
Jane Smith|123 Main Street|Playstation3

TIA!


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

Default Re: Exporting a DTS query as an ASCII File - 12-10-2006 , 04:00 PM






Hello Mike,


The format with the pipe at the end would suggest to something reading it
that there is another column after the pipe (always blank) wouldn't it?

If this is really what you want then I would be inclined to concatenate the
pipe onto the end of the last column like this

SELECT
c1,
c2,
c3 + '|' as c3
FROM
t1




Regards

Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com

Quote:
I am performing a query and an ASCII export within a DTS job.
The conditions have been set for the export as Vertical line (PIPE) as
the
delimator and having a hard return at the end of each row. How can I
put a
vertical line at the end of each row. I tried forcing a new column
with PIPE
but I ended up with two PIPES at the end.
Need the export to look like below:
Harry Smith|123 Main Street|Playstation3|
John Smith|421 Main Street|Playstation3|
Jane Smith|123 Main Street|Playstation3|
Current export without the pipe at the end:
Harry Smith|123 Main Street|Playstation3
John Smith|421 Main Street|Playstation3
Jane Smith|123 Main Street|Playstation3
TIA!




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.