I have a table in SQL Server that has data I need but it's in a weird format that I cannot use. The data looks like this in the table:
Asset_ID Process_ID Datapoint_Name Data_Value
27 62 Name John
27 62 Location United States
My goal is to create a view using the aforementioned table so the data is formatted like this:
Asset_ID Process_ID Name Location
27 62 John United States
I know how to create a view but I don't know how to achieve this in code. Can someone give me an example script on how to do this? Thanks.
To clarify for mods that previously closed my question: The values in the Name/Location columns above are strings, so using the SUM function isn't possible like in older posts asking similar questions. My question is somewhat unique because of this.