I have this simple sql statement:
SELECT FCDT.description AS DetailType, FCD.data
FROM Contact_Detail FCD
LEFT JOIN Contact_Detail_Types FCDT
ON FCD.contact_detail_types_id=FCDT.contact_detail_types_id
WHERE contacts_id='4AA36958--0804CA'
which makes this result:
DetailType data
-------------------------------
Phone 123-456-7890
Email myEmail@domain.com
I need to convert this rows to columns, to have this result:
Phone Email
--------------------------------
123-456-7890 myEmail@domain.com
How I can accomplish this? I have some hours playing with the pivot function, but no results so far.