How to load error details in the table

Traitée How to load error details in the table

  • Thursday, January 24, 2013 2:44 AM
     
     
    Hi here is my req in SSIS.

    I'm loading data from Excel to a ORA Table. Now I need to due 2 validations:

    If the column1 is non numeric, pass '0' to "validation column" else pass '1'.
    If the column2 is non numeric, pass '0' to "validation column" else pass '1'.
    I had done these validations in derived column and every thing is OK. 

    Now my Req is:  I have to load error desc in the "ErrorDesc" column.

    i.e:

    if a row has non numeric value in column-1 then we should pass the value "Column-1 Not Numeric" to column ErrorDesc column.
    if a row has non numeric value in column-2 then we should pass the value "Column-2 Not Numeric" to column ErrorDesc column.
    if a row has non numeric value in column-1 & column-2 then we should pass the value "Column-1 Not Numeric and Column-2 Not Numeric" to column ErrorDesc column.


    How to load this error details into the error table.



    Royal Thomas

All Replies

  • Thursday, January 24, 2013 4:08 AM
     
     
    Did you try Conditional split task?

    Thanks Ayyappan Thangaraj, http://SQLServerRider.wordpress.com

  • Thursday, January 24, 2013 4:22 AM
     
     Answered

    Because it is custom error message you have to create derived column and use that as error descrition:

    Like

    DRV1 : Column1 is not numeric

    DRV2: Column2 is not numeric

    FinalDRV: (DT_STR,1000,1252)((ISNULL( [Description]) ? [Description] : "") + (ISNULL([Category]) ? " and " + [Category] : ""))

    Something of this Sort!

    Regards,Eshwar.


    Please don't forget to Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful. It will helpful to other users.