Forum Replies Created

Viewing 3 posts - 16 through 18 (of 18 total)

  • RE: AGGREGATE

    Thanks mhike2hale:

    I tried your given statements in Access SQL as:

    SELECT CATEGORY,

    sum(case when left(Barcode, 1) in ('M', 'D') then Qty else 0 end) AS Sales,

    sum(case when left(Barcode, 1) in ('A', 'B')...

  • RE: AGGREGATE

    Help, hope you guys could give me helpful ideas

    and not unrelated links....

    Thanks 😉

  • RE: AGGREGATE

    I tried this command but sadly it's not working correctly:

    SELECT Category,SUM(Qty) AS RegQty,

    (SELECT SUM(Qty)

    FROM SalesDetail

    WHERE LEFT(Barcode,1) IN('A','B')) AS SaleQty

    FROM SalesDetail

    WHERE LEFT(Barcode,1) IN('M','D')

    GROUP BY Category

    QUERY OUTPUT:

    Category ...

Viewing 3 posts - 16 through 18 (of 18 total)