dbTalk Databases Forums  

DTS Transformation

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


Discuss DTS Transformation in the microsoft.public.sqlserver.dts forum.



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

Default DTS Transformation - 09-16-2003 , 09:05 PM






I am exporting a text file using a DTS package. I would
like to take and int data type field from a table and
transform it to a right justified, leading zero filled
fixed length field in the text file. Is there a way to
do this either using the Designer or by using a VB
function of some type?
Thanks for any help.
Stan

Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: DTS Transformation - 09-16-2003 , 10:19 PM






I would just do it in the select used to pull the data. You don't say what
size you want but this should give you the idea.

SELECT RIGHT('0000000000' + CAST(YourInt AS VARCHAR(12)),10) FROM YourTable


--

Andrew J. Kelly
SQL Server MVP


"Stan Gosselin" <sgosselin (AT) unitedliquors (DOT) com> wrote

Quote:
I am exporting a text file using a DTS package. I would
like to take and int data type field from a table and
transform it to a right justified, leading zero filled
fixed length field in the text file. Is there a way to
do this either using the Designer or by using a VB
function of some type?
Thanks for any 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.