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!

DTS why string to int conversion not working?

Status
Not open for further replies.

hughed00

Technical User
Jan 15, 2001
43
0
0
US
I have done this before, I just can't figure out why my straightforward import of a flat fixed length field won't allow the last string to be converted to an int. This always worked in the past.

Now I am getting the error conversion invalid for datatypes. What did I forget to do??
 
This is a real long shot, but its happened to me:

if it worked before, but doesn't work now, and if you are getting the file via FTP, then the likely cause is that it was up/downloaded in binary mode rather than ASCII mode. Robert Bradley
Support operation moo!
Visit the OpCow page to help in this cause
 
Nope, but it SHOULD work, right? I don't have to do anything more than define the destination column as int and the strings should be converted automagically?
 
Since you mentioned it's a fixed-length file, I assume that there are no quoted strings...correct?

Assuming that is correct, you are right - I can't think of any immediate reason why it wouldn't work. Ideas:

* what is the largest number contained in that column? If too large, it would exceed the scale of an Int column.

* are rows delimited by CR/LF? I assume so, but wanted to ask. Robert Bradley
Support operation moo!
Visit the OpCow page to help in this cause
 
I had a similar occurrence. Assuming you're correct about it not translating the last variable, there's probably something wrong with that value. Have you looked at the value that's coming in? And looked at exactly what kind of int is defined in the destination table ?

In the case where I had a problem, there was an incoming 3-digit field. I decided (for reasons that are irrelevant here) to change the value I was using as a Missing Data value on the ouput table. Of course, I never exceeded the input data width, but I *did* exceed the max value allowed in a tiny int field which is how it was defined in the destination table. Perhaps your problem is similar.

Bev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top