Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Int to varchar in DTS

Status
Not open for further replies.

cocopud

Technical User
Jan 8, 2002
139
0
0
US
I have a DTS package that has integer values which I want to convert to chars because they are dropping the leading zeros in the export. I have search for information on this and I tried adding a convert or cast into the select statement but no matter what I do the leading zeros are still gone. Does anyone know of anyway to export a file in DTS to a csv file and keep the leading zeros? From what I read converting it to a varchar/char should work, but it is not working for me. When I go through the export process and put in the select statement and then look at the mappings under Transform, I see the fields and they say they are char, but when I open the output the zeros are gone.

Any help would be appreciated, this is driving me nuts

 
Assuming you're using a Text File (Destination), double-click the icon and change the text qualifier from "<none>" to "Double Quote {"}"
Under the Transform Data Task Properties window, make sure that the field has a Type of "Quotable".

soi là, soi carré
 
I would recommend looking at the advanced options of the source and destination. There are data types options in there too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top