dbTalk Databases Forums  

Format of export

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


Discuss Format of export in the microsoft.public.sqlserver.dts forum.



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

Default Format of export - 02-05-2004 , 10:21 AM






I need to export data to a text file with a fixed record length. Positions 13-25 of the record contain price information and needs to contain leading zeros. My query is fine except that it produces leading spaces instead of zeros. How can I format the price to have leading zeros?

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

Default Re: Format of export - 02-05-2004 , 10:43 AM






what is the destination field definition. Leding zeros will not be stored
in Money, decimal or float datatypes.

If the definition is a character field then I would do this using an ActiveX
transform

--
--

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


"cjl" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I need to export data to a text file with a fixed record length.
Positions 13-25 of the record contain price information and needs to contain
leading zeros. My query is fine except that it produces leading spaces
instead of zeros. How can I format the price to have leading zeros?




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.