Results 1 to 9 of 9

Thread: Derived Column Conversion Issue

  1. #1
    Join Date
    Oct 2009
    Posts
    6

    Derived Column Conversion Issue

    Hi,

    I have a problem with a derived column. There is a txt file that I load to the database using SSIS. Before the load I have to convert one of the columns into integer because it's what should be used in the db. There are nothing but integers there, but I still receive an overflow error for all numbers >= 32768. I tried all integer types in SSIS, also numeric and float, and still get the same error, so I guess it's a problem with buffer size or something else that does not understand integers higher than 2^15.

    How can I fix it? All your ideas are highly appreciated.

    V.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Maybe table uses smallint for the column, double check it.

  3. #3
    Join Date
    Oct 2009
    Posts
    6
    It's integer on the table. It shows an error on the source.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Does the column in data file contain non-numeric value? Don't need convertion if all values are numeric.

  5. #5
    Join Date
    Oct 2009
    Posts
    6
    Tried it too, still the same error on the source file.

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    Then you have to check data in source file.

  7. #7
    Join Date
    Oct 2009
    Posts
    6
    What do you mean by "check data"? I created error output on the source file, and it shows that all records with a value >= 32768 cause a problem. What else should I check?

  8. #8
    Join Date
    Sep 2002
    Posts
    5,938
    How did you create data file? If data type in sql table is correct, then only issue will be data self. Ensure there's no hidden characters and column terminator is valid.

  9. #9
    Join Date
    Oct 2009
    Posts
    6
    I fixed it, thank you. Needed to change data type in flat file connection manager.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •