Data conversion SSIS

  • Hi,

    I'm struggling to convert some data from a csv file to a table. The data is price data, however some records have an N/A.

    In good old access the following does the trick

    IIf(IsNull([price]),0,IIf([Price]="N/A",0,CDbl([price])))

    I believe I need to do the conversion in a derived transformation, but it's not working so well.

    Any help much appreciated

    Mike

  • Here's what you're looking for...

    ([Column 2] == "N/A" ? "0" : [Column 2])

    What this says is if col2 equals "N/A" then make it "0", else leave it as col2...

    This goes in the expression box of your derived col transform.

    Good Luck.

    Watch my free SQL Server Tutorials at:
    http://MidnightDBA.com
    Blog Author of:
    DBA Rant – http://www.MidnightDBA.com/DBARant

    Minion Maintenance is FREE:

Viewing 2 posts - 1 through 1 (of 1 total)

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