Date Column Extraction from a flat file.

  • Dear friends

    My falt file contains a column in the fallowing format:

    Date

    11/06/08(DD/MM/YY)

    12/08/08

    00/00/00

    13/01/08

    00/00/00

    If the row appears like 00/00/00 .I'll have to replace with the value "NULL" Instead of 00/00/00

    plz guide me.

  • Actually very easy, create a derived column with an expression inside

    Something like Sourcefieldname == "00/00/00" ? NULL : Sourcefieldname

    You will have to read up on the correct Null function to use however...

    ~PD

  • NULLIF(yourcolumn,'00/00/00')

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

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