After running this query
SELECT Title ,
CASE WHEN fieldName = 'Supplier Name' THEN fieldvalue
END AS 'Supplier Name',
CASE WHEN fieldname = 'Legal Agreement Name' THEN fieldValue
END AS 'Legal Agreement Name'
FROM PCM_MultiItems_Metadata
WHERE PROFILEID =254
and fieldname in ('Creator Contact Name','Supplier Name','Legal Agreement Name');
I am getting
I have this table generated in sql server for different properties of different assets
How can I format this table in sql so that I get table such as Title becomes my first column, Supplier Name and Legal Name being my 2nd and 3rd columns respectively
My sql query to generate that table is
SELECT Title, FieldName, Fieldvalue
from PCM_MultiItems_Metadata
WHERE PROFILEID =254
and fieldname in ('Creator Contact Name','Supplier Name','Legal Agreement Name');
I want an output such as
Title | Supplier Name | Legal Agreement Name
231457 Bay VALLEY IMAGE AND DIGITAL AGREEMENT
232058 BUCKHEAD MEAT;NEWPORT MEAT SYSCO MEAT BRAND GUDILINE