Hello, I have a result set which disaplays 2 columns with 2 rows data.and i want to show it as a row.I know it colud be achieved by using pivot.but i tried something and unable to get the required result.please help me.
My raw query :
I want to show the above result set in to single row like below:
so i tried pivot query like below but getting null values.
SELECT [PUBLICATION_ID] , AS ITEM_REFERENCE_ID1, AS ITEM_REFERENCE_ID2 FROM
(SELECT [PUBLICATION_ID],[ITEM_REFERENCE_ID] FROM [Tridion_Broker].[dbo].[ITEMS]) SS
PIVOT ( MAX ([ITEM_REFERENCE_ID]) FOR [ITEM_REFERENCE_ID] IN (,) ) AS PVT
answered May 31, 2013 at 07:19 AM