Hi, I need some help using the PIVOT clause.
I have a table which has been previously pivoted (or unpivoted, not sure which) so that each row has been split into its separate parts with row_numbers assigned in a new column REF_ROW_NO.

I need to reverse this back to its previous format so I can compare some other data to it
I have managed to get the desired results with a self-join and some filtering, though this is quite an untidy approach.
How do I do it with the PIVOT clause, so that I have a column for VALUE_DESC and a column for VALUE_ID for each REF_ROW_NO
So fro example, the first row would be:
REF_ROW_NO=1 VALUE_DESC='Canal' VALUE_ID=311
Thanks,
Rob.