AS400 to SQL 2008 ...

  • A Column from AS400 table is Empty (no value)..... this column is mapped to Sql smalldatetime data type column. I get an error saying that this column has potential loss data.

    Can any of you, try to tell me ehat exactly it means ...Thank you

  • This is just a theory, since I haven't used AS400 -

    SSIS sometimes has issues with trying to automate certain things that would otherwise seem normal to do. What may be happening is that your empty value from the column in AS400, is coming in to SSIS as an empty string instead of as a NULL value. Then, SSIS is trying to write an empty string to a SMALLDATETIME column, and throwing an error.

  • quillis131 (8/25/2011)


    A Column from AS400 table is Empty (no value)..... this column is mapped to Sql smalldatetime data type column. I get an error saying that this column has potential loss data.

    Can any of you, try to tell me ehat exactly it means ...Thank you

    Try changing the Column from SmallDateTime to DateTime.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • As I can't change it, But I guess there should be a value to fix this .....

  • I believe that the Potential Data Loss means that you are only going to get an accuracy of the DateTime in minutes as opposed to seconds.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • As a few of the above replies, I'm not familiar with working on AS400, but here's a thought on how SSIS might be handling the empty/NULL date that you're mapping to the smalldatetime field destination. There's an option on the data source in the data flow to retain NULL values (should be on the first tab). It may very well be that SSIS is converting that empty value to an incompatible value and is trying to push that into the smalldatetime destination, leading to the error message you're getting. Retaining the incoming NULL value may be all that you need.

    Also, be sure that your destination allows NULLs 😀

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply