• santuraj12 (3/22/2014)


    Hi All,

    Need your help on getting the sql query for the below data

    EMP ID Flag Processing Date

    ABC1 yes Current Date

    ABC1 No Old Date

    DEF1 Yes Current Date

    DEF1 No Old Date

    GHI1 Yes Old Date

    JKL1 yes Current Date

    JKL1 No Old Date

    i need to select only EMP ID for the above table for which Flag is set to Yes and Processing Date is old Date.

    Thank you

    Santosh

    Just add mostly what you said the a WHERE clause.

    --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)