Query Help

  • I have been look at this all day and need some other eyes, when I run the query below I am getting three lines when my goal is one total and cannot find a way to remove the ones I do not need, which are the nulls. It does give me the total 5979.30 but the other two lines are not needed.

    It's the case stmt for the amount that is giving me the issue. I have tried putting it the case below as a nested case and it doesn't work either, the query I am writing is much bigger and this is the only issue I am having

    Nested case stmt
    (case when gn.glacctid = 25 then t.amex end ) +
    (case when gn.acctid = 26 then t.vmc end) +
    case when gn.acctid = 22 the t.wright end) as Amount

    Query

    Select distinct

    t.GLStoreNum,

    case when gn.GLAcctID = 25 then g.GLAcctNum

    when gn.GLAcctID = 26 then g.GLAcctNum
    when gn.GLAcctID = 22 then t.Wright
    end as accoutNum,

    case when gn.GLAcctID in (25,26,22) then t.Amex_ + t.VMC_ + t.Wright end as amount

    from tblGLAccountNums gn left join

    tblGLAccounts g on gn.GLAcctID = g.GLAcctID inner join

    #tmpX1 t on g.GLStoreNum = t.GLStoreNum


    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARcAAABhCAYAAAD83+W8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA2jSURBVHhe7Z2/r9zGEcf5Ahdyl5QprU5CXFiAgdTxf5DSQCoFKmIjlf+DwJ2QIohSGFEVxF2SLp2UIoDdWYUEvc4qXaZVYeCF38f31Q7nzZK73OHxjjcfgP5qZn+QN7e7nOO7W1/c++WvrzrF62//0V2+enFjBZJ//uvf3fP/PO/+/KfHN57EN9923YOPuu47hO7jwQfef3nZffqbT7vu0YNr+8Wjp93Drx52n338tHvylyfd3//22bX/FLj/4YPu9cvvbqx6puIX7Iuf3GjgxMOvnnTP//v4etHgQb5+9E339HdPrxcfLCzv37m8KTlesJjIo2VhCc6LyFwqWXLnffHisnv8x+c31m1OKXNpJTKX8yEWl0picrQR8TsfYnGphJPj2fNnN54gCCxicQmCYBWKFhfcrYMgCGooXlzwUSAIgqCUqsVlq+cMn/zqk3jG0UDEzybiMsY7HtWLC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xzGZlLG94p716IuCQ2z1zwRqCsdCVs1a0Xtr3gPXD2QsQl4b3Qxl+LzoSIn03EJSHnmwfxPZczIeJnE3FJyPnmgWvm4v3VfyiBXYL8yrMk5weWb2+Uxg/kYmTFL+cnOf+xUBIX+Rp5kDnfVFmOXB0vfw453zxwy1ywoMiv/m/x2yIEUX7lmUGd8vPfe6c0flY84MvFz/ITq69joyQuQL5OHCD3+qUPB5mLF8jV8fJPIeebB26Zi/4tEbDq1SqB7Q0Dfw6UxO+c4kFaxlVJrDjJS9ky/nK+ebDaMxdQUm9OCexgOYeOX+2k2orSuOD18Ngrcr554PrMBcpnLlv9KjqwifjZlMYFCyUPa4GxFlPtY1sec8j2uba1/inkfPPAPXPZ8plLkOeQ8cNg5qQ4dkriMvdaal4v6vGYwuoz17bWn0PONw/cMxcqKKk3pwR2sJxDx0/eManHSGtccgtLzl9CS9sW5HzzwC1z0ZkKsOrVKoEdLOeQ8ePdkhNki4lSSklccotj7SKQ60eS63PqGixKzqWR880Dt8yFH4W2fOaCNwVB5SEHt+U/J0ril2PPcW0ZV0D6cUyR60e3k3VYlmtb659CzjcPXJ+5YEHx3OISSmCXgCDykOT8wPLtjdL4gVyMrPjl/CTnPxZaxpX0WWUWc3VlOQ9i+UCtP4ecbx6s9szFSwnsYDkRP5uIS0LONw9cM5c1lMAOlhPxs4m4JOR882DRfi5bbHMZ+7m0EfuW2ERcEpvv5/L5Rttcxn4ubcS+JTYRl4T3QluduUx9hAkNDT1d9c7gqhaXZ8+f3XiCIAimqXqgGwRBUEosLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEDX/R82HIFkRyg9GAAAAABJRU5ErkJggg==

    MCSE SQL Server 2012\2014\2016

  • What exactly is the problem?  Your query is returning rows that have not a 25 in GLAcctId so that field is NULL.  Looking at case statement posted not the one in the query those don't have default values and conditions are mutually exclusive so yeah that will always return NULL.

    Did you mean for it to be,
    (case when gn.glacctid = 25 then t.amex WHEN gn.acctid = 26 then t.vmc  WHEN gn.acctid = 22 THEN t.wright end) as Amount

  • Your statement:
    Nested case stmt
    (case when gn.glacctid = 25 then t.amex end ) +
    (case when gn.acctid = 26 then t.vmc end) +
    case when gn.acctid = 22 the t.wright end) as Amount

    Is not the same logic you show in your SQL for calculating Amount..

    I don't think you are taking into account what happens when gn.GLAcctID is not 25 or 26, thus the NULL.  And what if one of your amounts are NULL, then you get your second result I'm assuming.

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • updating original query and post

    MCSE SQL Server 2012\2014\2016

  • below86 - Friday, October 13, 2017 1:44 PM

    Your statement:
    Nested case stmt
    (case when gn.glacctid = 25 then t.amex end ) +
    (case when gn.acctid = 26 then t.vmc end) +
    case when gn.acctid = 22 the t.wright end) as Amount

    Is not the same logic you show in your SQL for calculating Amount..

    I don't think you are taking into account what happens when gn.GLAcctID is not 25 or 26, thus the NULL.  And what if one of your amounts are NULL, then you get your second result I'm assuming.

    when I use the nested stmt I get;

    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAt4AAAGhCAYAAABWCLPWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAGO6SURBVHhe7d1PiBxZnuD5X9R2QxXsQQ3qpXRYmBApSG9KsO4oDzVMH6RiFhRBHtJFFiiC3UtIghoNBSkFCYsik0UZsQuJhxKSzk6QFKclIiETuQ5JhA5Lhw4zTB1SuA9IlAskIuawEMWkoHRoqIRu8P39zN5zNzM3Nzf/Exb/vh9hMn/27L+9cPv5s2dmU20lERvfbMjc1TmXAgAAADAJP3N9AAAAAPuIwBsAAAAoAIE3AAAAUAACbwAAAKAABN4AAABAAQi8AQAAgAIQeAMAAAAFIPAGAAAACkDgDQAAABSAwBsAAAAoAIE3AAAAUAACbwAAAKAABN4AAABAAQi8AQAAgAIQeAMAAAAFIPAGAAAACk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012\2014\2016

  • ZZartin - Friday, October 13, 2017 1:31 PM

    What exactly is the problem?  Your query is returning rows that have not a 25 in GLAcctId so that field is NULL.  Looking at case statement posted not the one in the query those don't have default values and conditions are mutually exclusive so yeah that will always return NULL.

    Did you mean for it to be,
    (case when gn.glacctid = 25 then t.amex WHEN gn.acctid = 26 then t.vmc  WHEN gn.acctid = 22 THEN t.wright end) as Amount

    I updated my original post, it's been a long day and I didn't write it very clearly. my apologies.

    MCSE SQL Server 2012\2014\2016

  • Apply some formatting and thing become easier to see...

    SELECT DISTINCT
      t.GLStoreNum,
      accoutNum = CASE
                        WHEN gn.GLAcctID = 25 THEN g.GLAcctNum
                        WHEN gn.GLAcctID = 26 THEN g.GLAcctNum
                        WHEN gn.GLAcctID = 22 THEN t.Wright
                    END,
      amount = CASE WHEN gn.GLAcctID IN (25, 26, 22) THEN t.Amex_ + t.VMC_ + t.Wright END
    FROM
      tblGLAccountNums gn
      LEFT JOIN tblGLAccounts g
       ON gn.GLAcctID = g.GLAcctID
      INNER JOIN #tmpX1 t
       ON g.GLStoreNum = t.GLStoreNum;

    The 1st thing that jumps out ... You have a LEFT JOIN from tblGLAccountNums to tblGLAccounts, but then you have an INNER JOIN from tblGLAccounts to #tmpX1 ... Effectively turning the LEFT JOIN into an INNER JOIN. So, if you're not seeing the number of rows you're expecting, that's your culprit.

  • lkennedy76 - Friday, October 13, 2017 1:14 PM

    I have been look at this all day and need some other eyes, when I run the query below I am getting three lines when my goal is one total and cannot find a way to remove the ones I do not need, which are the nulls. It does give me the total 5979.30 but the other two lines are not needed.

    It's the case stmt for the amount that is giving me the issue. I have tried putting it the case below as a nested case and it doesn't work either, the query I am writing is much bigger and this is the only issue I am having

    Nested case stmt
    (case when gn.glacctid = 25 then t.amex end ) +
    (case when gn.acctid = 26 then t.vmc end) +
    case when gn.acctid = 22 the t.wright end) as Amount

    Query

    Select distinct

    t.GLStoreNum,

    case when gn.GLAcctID = 25 then g.GLAcctNum

    when gn.GLAcctID = 26 then g.GLAcctNum
    when gn.GLAcctID = 22 then t.Wright
    end as accoutNum,

    case when gn.GLAcctID in (25,26,22) then t.Amex_ + t.VMC_ + t.Wright end as amount

    from tblGLAccountNums gn left join

    tblGLAccounts g on gn.GLAcctID = g.GLAcctID inner join

    #tmpX1 t on g.GLStoreNum = t.GLStoreNum


    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARcAAABhCAYAAAD83+W8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAA2jSURBVHhe7Z2/r9zGEcf5Ahdyl5QprU5CXFiAgdTxf5DSQCoFKmIjlf+DwJ2QIohSGFEVxF2SLp2UIoDdWYUEvc4qXaZVYeCF38f31Q7nzZK73OHxjjcfgP5qZn+QN7e7nOO7W1/c++WvrzrF62//0V2+enFjBZJ//uvf3fP/PO/+/KfHN57EN9923YOPuu47hO7jwQfef3nZffqbT7vu0YNr+8Wjp93Drx52n338tHvylyfd3//22bX/FLj/4YPu9cvvbqx6puIX7Iuf3GjgxMOvnnTP//v4etHgQb5+9E339HdPrxcfLCzv37m8KTlesJjIo2VhCc6LyFwqWXLnffHisnv8x+c31m1OKXNpJTKX8yEWl0picrQR8TsfYnGphJPj2fNnN54gCCxicQmCYBWKFhfcrYMgCGooXlzwUSAIgqCUqsVlq+cMn/zqk3jG0UDEzybiMsY7HtWLC/x3et/b/jiEfq0WtkOf/9Q14mdrxGWsOh4eVH+JruRCPVVT2i50UE1pu72rprTdXnUNqheXkgv1VE1pu9BBNaXt9q6a0nZ71TXYTeaCr6bfvfmKOlSWazvXzipvVavfqevxVk1pu0ProeOkKW23V12DXWQuGJj4zcv3/UGVAxOUtJMD3GtgAz1xQK6+t2pK2x1CZVzAIeOkKW13SNXxWFPXYBeZC9B+LBhT5ZYfCwxtoOsvUSL9IFffWzWl7Q6hgDbJlXurprTdIRWU1PPQNdhF5gIs/1w5sPxQoDMZ2DKjydmyHZjKpKRf2uxH26xXqppcPX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D18Ngrcr554PrMBcpnLlv9KjqwifjZlMYFCyUPa4GxFlPtY1sec8j2uba1/inkfPPAPXPZ8plLkOeQ8cNg5qQ4dkriMvdaal4v6vGYwuoz17bWn0PONw/cMxcqKKk3pwR2sJxDx0/eManHSGtccgtLzl9CS9sW5HzzwC1z0ZkKsOrVKoEdLOeQ8ePdkhNki4lSSklccotj7SKQ60eS63PqGixKzqWR880Dt8yFH4W2fOaCNwVB5SEHt+U/J0ril2PPcW0ZV0D6cUyR60e3k3VYlmtb659CzjcPXJ+5YEHx3OISSmCXgCDykOT8wPLtjdL4gVyMrPjl/CTnPxZaxpX0WWUWc3VlOQ9i+UCtP4ecbx6s9szFSwnsYDkRP5uIS0LONw9cM5c1lMAOlhPxs4m4JOR882DRfi5bbHMZ+7m0EfuW2ERcEpvv5/L5Rttcxn4ubcS+JTYRl4T3QluduUx9hAkNDT1d9c7gqhaXZ8+f3XiCIAimqXqgGwRBUEosLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEIsLkEQrEDX/R82HIFkRyg9GAAAAABJRU5ErkJggg==

    I m trying to guess this, hope this gives u an idea where to make the change

    for 2nd row the value of amount is 5279.299 which states that none of the "t.Amex_ , t.VMC_ , t.Wright" is NULL. So it means that CASE stmt for accountnum matched either

    when gn.GLAcctID = 25 then g.GLAcctNum

    when gn.GLAcctID = 26 then g.GLAcctNum

    So, considering that for gn.GLAcctID = 25 oR gn.GLAcctID = 26 the g.GLAcctNum IS NULL, means that
    the LEFT JOIN (tblGLAccountNums gn left join

    tblGLAccounts g on gn.GLAcctID = g.GLAcctID) for gn.GLAcctID = 25,26 there is no matching g.GLAcctID = 25,26 hence causing g.GLAcctnum to be NULL.

    Try to shift the temp table to the Left most table, coz the join is eventually converting into INNER and fetching resords from temp only.

    First solve the problem then write the code !

  • Jason A. Long - Saturday, October 14, 2017 7:34 PM

    Apply some formatting and thing become easier to see...

    SELECT DISTINCT
      t.GLStoreNum,
      accoutNum = CASE
                        WHEN gn.GLAcctID = 25 THEN g.GLAcctNum
                        WHEN gn.GLAcctID = 26 THEN g.GLAcctNum
                        WHEN gn.GLAcctID = 22 THEN t.Wright
                    END,
      amount = CASE WHEN gn.GLAcctID IN (25, 26, 22) THEN t.Amex_ + t.VMC_ + t.Wright END
    FROM
      tblGLAccountNums gn
      LEFT JOIN tblGLAccounts g
       ON gn.GLAcctID = g.GLAcctID
      INNER JOIN #tmpX1 t
       ON g.GLStoreNum = t.GLStoreNum;

    The 1st thing that jumps out ... You have a LEFT JOIN from tblGLAccountNums to tblGLAccounts, but then you have an INNER JOIN from tblGLAccounts to #tmpX1 ... Effectively turning the LEFT JOIN into an INNER JOIN. So, if you're not seeing the number of rows you're expecting, that's your culprit.

    the join was definitely part of the issue, I didn't even see that, thank you. I guess that's what happens when you stare at code for to long. I put in left joins and the data comes across now but it puts in three rows one for each GLacctID when I only need one row all three totaled up into one total.
    data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASAAAAA+CAYAAACLKMbfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAekSURBVHhe7Z3Bbuw2DEUzXfU3uizQTf//H9JFitfd6290l+YCYUwoJE2OJHvGugcg7HctURpKlJkgmHd7/+Dlg3///uvltz/+xC0p8s9H7H5n7HZZMU7Mqw1r/X/5vL7893kldX79vJKYFePEvNqw1v/28+31HUHCQ1555ZXXmde2Avr6EYw/RtwPy+wcK8aJebVhrf/Xj2A4och94GQn+6wYJ+bVhrX+/B3QALjJcqwYJ+bVhrX+rIAGwE2WgxXQ2gypgG6325dpPB1Y2pWobDIvPl7sQKtn22n0M9yLaTwdRG3F9pgVJ08XPB14fau6RyavtM/W954WPfPw2ozSPborIAyE31mLycCRLvdXprLJWqBZsbOIfET9NGhnjRfpcq/RbWEZZsTJ0wXLl1D16ekR2UNX+4UBbzytwYTM/Lw2o/SIIRVQB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9VowT82rj+/q/vPwP3VMJ/UZELvwAAAAASUVORK5CYII=

    MCSE SQL Server 2012\2014\2016

  • I'm not sure why I didn't spot this yesterday, but the fact that, in the SELECT list, you're getting [GLStoreNum] from #tmpX1... and... It wasn't returning any nulls.
    That's a big clue!... (I'm not 100% sure about what you're going after, but I suspect the following).

      1) you've written the query backwards. #tmpX1 should be the leftmost table and tblGLAccountNums should be the rightmost table. 
     2) you don't need or want LEFT JOINs.
      3) #tmpX1 rows with a [GLStoreNum] value of '001'.

    Here is an alternate version of your query now that I've had a better look at it... Keep in mind this is based mostly on what I "suspect" you're trying to do. Note: I added all of the join columns to the where clause to make it easier to visualize the actual relationships at the actual joins. (Tip-O'-the-Day: this makes it MUCH easier to spot the pain points when you're getting unexpected results.)

    SELECT --DISTINCT shouldn't need distinct at this point.
       t.GLStoreNum,
        gn.GLAcctID,    -- for dev info only. remove or
        g.GLAcctID,        -- comment out before deployment.
        g.GLStoreNum,    --
        accoutNum = CASE -- (what I suspect is correct... tblGLAccounts is the test and tblGLAccountNums provides the "true" value)
                        WHEN g.GLAcctID = 25 THEN gn.GLAcctNum
                        WHEN g.GLAcctID = 26 THEN gn.GLAcctNum
                        WHEN g.GLAcctID = 22 THEN t.Wright
                    END,
      --accoutNum = CASE -- (original version)
                    --    WHEN gn.GLAcctID = 25 THEN g.GLAcctNum
                    --    WHEN gn.GLAcctID = 26 THEN g.GLAcctNum
                    --    WHEN gn.GLAcctID = 22 THEN t.Wright
                    --END,
      amount = CASE     -- changed from gn to g here too...
                        WHEN g.GLAcctID IN (25, 26, 22)
                        THEN t.Amex_ + t.VMC_ + t.Wright
                 END
    FROM
      #tmpX1 t
      JOIN tblGLAccounts g                    -- toggle between left & inner to gauge the output (
            ON t.GLStoreNum = g.GLStoreNum
        LEFT JOIN tblGLAccountNums gn            -- toggle between left & inner to gauge the output
       ON g.GLAcctID = gn.GLAcctID            -- (left join will be necessary for the 3rd "when"
            AND gn.GLAcctID IN (25, 26);        -- condition of accoutNum to have the possibility of being true true.

    HTH,

    Jaon

  • Jason A. Long - Sunday, October 15, 2017 1:41 PM

    I'm not sure why I didn't spot this yesterday, but the fact that, in the SELECT list, you're getting [GLStoreNum] from #tmpX1... and... It wasn't returning any nulls.
    That's a big clue!... (I'm not 100% sure about what you're going after, but I suspect the following).

      1) you've written the query backwards. #tmpX1 should be the leftmost table and tblGLAccountNums should be the rightmost table. 
     2) you don't need or want LEFT JOINs.
      3) #tmpX1 rows with a [GLStoreNum] value of '001'.

    Here is an alternate version of your query now that I've had a better look at it... Keep in mind this is based mostly on what I "suspect" you're trying to do. Note: I added all of the join columns to the where clause to make it easier to visualize the actual relationships at the actual joins. (Tip-O'-the-Day: this makes it MUCH easier to spot the pain points when you're getting unexpected results.)

    SELECT --DISTINCT shouldn't need distinct at this point.
       t.GLStoreNum,
        gn.GLAcctID,    -- for dev info only. remove or
        g.GLAcctID,        -- comment out before deployment.
        g.GLStoreNum,    --
        accoutNum = CASE -- (what I suspect is correct... tblGLAccounts is the test and tblGLAccountNums provides the "true" value)
                        WHEN g.GLAcctID = 25 THEN gn.GLAcctNum
                        WHEN g.GLAcctID = 26 THEN gn.GLAcctNum
                        WHEN g.GLAcctID = 22 THEN t.Wright
                    END,
      --accoutNum = CASE -- (original version)
                    --    WHEN gn.GLAcctID = 25 THEN g.GLAcctNum
                    --    WHEN gn.GLAcctID = 26 THEN g.GLAcctNum
                    --    WHEN gn.GLAcctID = 22 THEN t.Wright
                    --END,
      amount = CASE     -- changed from gn to g here too...
                        WHEN g.GLAcctID IN (25, 26, 22)
                        THEN t.Amex_ + t.VMC_ + t.Wright
                 END
    FROM
      #tmpX1 t
      JOIN tblGLAccounts g                    -- toggle between left & inner to gauge the output (
            ON t.GLStoreNum = g.GLStoreNum
        LEFT JOIN tblGLAccountNums gn            -- toggle between left & inner to gauge the output
       ON g.GLAcctID = gn.GLAcctID            -- (left join will be necessary for the 3rd "when"
            AND gn.GLAcctID IN (25, 26);        -- condition of accoutNum to have the possibility of being true true.

    HTH,

    Jaon

    found the issue, group by
    the joins where part of the issue as well.
    thank you all for your help

    MCSE SQL Server 2012\2014\2016

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

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