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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Load text to int 1

Status
Not open for further replies.

hughed00

Technical User
Jan 15, 2001
43
US
I don't remember having problems with this before (good since I don't know how to do it!).

I have a text file source which is fixed length fields. The last field is a "number" representing length of a message.

When I setup DTS import using the wizard before, I seem to remember having no trouble designating the destination field to int even though it was importing text.

Now I get the error that the datatypes do not match and the import fails.

Do I need to add some code in the import for the conversion? Any idea why this is happening or a way around it (since I seem to have been able to magically do this conversion previously).

Thanx!!
 
First, check your input file and make sure that each and every row has an entry (no blanks) for the problem column. I found this to be a problem, and when there is something there (even "0"), it works fine. Robert Bradley
teaser.jpg

 
Apparently DTS can import empty text data fields as blank instead of null. Apparently, blank text does not convert to numeric.

One alternative would be to supply your own DTS script for each numeric field allowing numerics to go through. dropping blanks, and flagging errors on text which is both non-blank and non-numeric.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top