Mark Cowne
One Orange Chip
Points: 26986
More actions
July 4, 2013 at 4:36 am
#1629798
SELECT DocumentNo_,
MAX(CASE WHEN DimensionCode='DEPARTMENT' THEN DimensionValueCode END) AS DimensionValueCode_1,
MAX(CASE WHEN DimensionCode='TRADETYPE' THEN DimensionValueCode END) AS DimensionValueCode_2
FROM myTable
GROUP BY DocumentNo_
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
alanshawkat
Grasshopper
Points: 14
July 5, 2013 at 4:32 am
#1630006
Thank you very much for your help.
I have tested the code and It worked .
Thank you,
Alan
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply