Hello again,
I been trying to get my query to return a NEWID for each group in my results. Here is what I have so far
This returns something like this
i need a way to get a NEWID for each warehouse something like this
Any assistance is appreciated
Thanks
I been trying to get my query to return a NEWID for each group in my results. Here is what I have so far
Code:
SELECT
NEWID()M
WAREHOUSE,
ITEM,
SUM(QTY) AS 'QTY'
FROM INVETORY
GROUP BY
WAREHOUSE,
ITEM
This returns something like this
Code:
NEWID WAREHOUSE ITEM QTY
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 0004-M 120
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 02457 83
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 30996 24
D5974B88-AEAF-4079-94E4-888840DBD8E5 002 0004-M 520
D5974B88-AEAF-4079-94E4-888840DBD8E5 002 0187-M 33
D5974B88-AEAF-4079-94E4-888840DBD8E5 002 05524 183
i need a way to get a NEWID for each warehouse something like this
Code:
NEWID WAREHOUSE ITEM QTY
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 0004-M 120
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 02457 83
D5974B88-AEAF-4079-94E4-888840DBD8E5 001 30996 24
50CC04A4-1C73-4F7A-99C2-70C826B30AEB 002 0004-M 520
50CC04A4-1C73-4F7A-99C2-70C826B30AEB 002 0187-M 33
50CC04A4-1C73-4F7A-99C2-70C826B30AEB 002 05524 183
Any assistance is appreciated
Thanks