justinbriggs1 0 Posted April 26, 2011 Report Share Posted April 26, 2011 (edited) Hey all, I've been tasked with cleaning up a query due to the delay we are getting with the results. My question is, how do I create a select statement which will return row values as column names?For example:Here is how the table is currently configured. Sorry it looks so jacked up, the column names are in brackets, with the corresponding rows below.[id_problem] [node_name] [node_value]2----------------urgency--------Whenever2------------------name-------A. Aaronson 2-----------------phone---------555-5555I would my select statement to return something like this:[id_problem]------[urgency]-------[name]-----------[phone]2------------------Whenever------A.Aaronson--------555-5555Any help would be appreciated, thanks.JW Edited April 26, 2011 by jwburnside Quote Link to post Share on other sites
birbal 168 Posted April 26, 2011 Report Share Posted April 26, 2011 I am not sure about row value as column name. But it seems you need to use self join here...if i am not missunderstanding Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.