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 |