Suppose I have a table like this:
ID NAME
1 John
2 Ann
3 Mike
etc, etc ...
ID column is unique
I need a query to return a table like this:
1 2 3
John Ann Mike
The IDs become the column names and there is only one row of data. Any ideas? I can not hardcode the column names because I don't know how many IDs I have ...
Cheers
ID NAME
1 John
2 Ann
3 Mike
etc, etc ...
ID column is unique
I need a query to return a table like this:
1 2 3
John Ann Mike
The IDs become the column names and there is only one row of data. Any ideas? I can not hardcode the column names because I don't know how many IDs I have ...
Cheers