Monday, March 19, 2012

DTS and Fixed Widths

Hi all.

I'm trying to export some tables in fixed width format for a client that needs it this way. The first time I did this, using Import/Export in Enterprise Manager, integer fields were 12 chars long. However, when I saved this as a DTS and ran it again later, it made integers 4 chars in the text file (which matches the lengths of the datatypes you see in enterprise manager.)

Why is this difference there? What do I need to do differently? Also, is there a list of how wide each data type is when exported as fixed delimited text?

thanks,
CraigWell, I just followed the same steps and received consistent results. My integer files were 12 characters with the initial run, and also when I saved it as a DTS package and ran it.

My suggestion is to check the Transform Data Task Properties in the DTS package and check the information in the Size column on the Destination tab for each column.

When you create the package via the Import/Export option in Enterprise Manager, one of the steps includes a "Transform..." button. Click on this so you can explictly set the size of each column you are exporting.

Terri|||yes I found it. There is a "Define Columns" button that specifies the size. Weird that the same DTS package yielded multiple results.

Thanks!

No comments:

Post a Comment