I have a table where I have a ticket_id's
,field_id's
and values.
eg.
ticket_id field_id value 1001 1 Peter 1002 1 Dave 1001 2 555-2565 1002 2 554-2548
The goal is I am trying to write a query that will display values within the same table, horizontally. eg.
Ticket_ID Field1 Field2 1001 Peter 555-2565 1002 Dave 554-2548
There are many field_ids
. I have tried using the rownumber()
but it didn't work.
Any ideas?