Forum Replies Created

Viewing 11 posts - 1 through 12 (of 12 total)

  • RE: Help with joining two tables

    JLS and Steve, thank you both very much for your help. I can finally leave the both of you alone now.

    When ADP gave me the deduction code value of HSP7,...

  • RE: Help with joining two tables

    J Livingston SQL (7/27/2015)


    or this....similar to Steve but altered the filters accordingly

    SELECT ED.EMPLID, ED.CHECK_DT, ED.AL_DEDCD, ED.AL_AMOUNT AS HSA_DEDUCTION, EM.AL_AMOUNT AS EMPLYR_HSA_CONTRIB

    FROM PS_AL_CHK_DED AS ED

    LEFT OUTER JOIN PS_AL_CHK_MEMO AS EM

    ON ED.EMPLID...

  • RE: Help with joining two tables

    sgmunson (7/27/2015)


    How about just this?

    SELECT ED.EMPLID, ED.CHECK_DT, ED.AL_DEDCD, ED.AL_AMOUNT AS HSA_DEDUCTION, EC.AL_AMOUNT AS EMPLYR_HSA_CONTRIB

    FROM PS_AL_CHK_DED AS ED

    LEFT OUTER JOIN PS_AL_CHK_MEMO AS EC

    ON ED.EMPLID = EC.EMPLID

    AND ED.CHECK_DT = EC.CHECK_DT

    AND EC.MEMO_CD =...

  • RE: Help with joining two tables

    Jeff Moden (7/26/2015)


    bgolembiesky 4883 (7/26/2015)


    Thanks for taking time to go through this Jeff. ADP assured me that the calculation was performing correctly but it's obviously not. I dumped both tables...

  • RE: Help with joining two tables

    Thanks for taking time to go through this Jeff. ADP assured me that the calculation was performing correctly but it's obviously not. I dumped both tables into excel for the...

  • RE: Help with joining two tables

    --===== If the test table already exists, drop it

    IF OBJECT_ID('TempDB..#PS_AL_CHK_DED','U') IS NOT NULL

    DROP TABLE #PS_AL_CHK_DED

    --===== Create...

  • RE: Help with joining two tables

    Jeff Moden (7/25/2015)


    bgolembiesky 4883 (7/25/2015)


    sgmunson (7/25/2015)


    bgolembiesky 4883 (7/24/2015)


    Unfortunately, it does not. That's what I tried initially. It seems like a simple request. All I want is the employee, check date...

  • RE: Help with joining two tables

    sgmunson (7/25/2015)


    bgolembiesky 4883 (7/24/2015)


    Unfortunately, it does not. That's what I tried initially. It seems like a simple request. All I want is the employee, check date and amount from ps_al_chk_ded...

  • RE: Help with joining two tables

    TomThomson (7/25/2015)


    You need to deal with a NULL introduced by the left join - it will produce NULL when there is no appropriate row in the RH table, but the...

  • RE: Help with joining two tables

    sgmunson (7/25/2015)


    bgolembiesky 4883 (7/24/2015)


    Unfortunately, it does not. That's what I tried initially. It seems like a simple request. All I want is the employee, check date and amount from ps_al_chk_ded...

  • RE: Help with joining two tables

    Unfortunately, it does not. That's what I tried initially. It seems like a simple request. All I want is the employee, check date and amount from ps_al_chk_ded where the dedcd...

Viewing 11 posts - 1 through 12 (of 12 total)