I have this sample data in two colums. the first column is the field name and the second column is the value in that field.
There will always be the same number of Field names such as SS, Fname, Lname, Addr for all of the information. in this examaple there are two records with four columns. The data is flexible so the column names will never be hardcoded using the "Create table" method, which is why the data is this way.
Can this be done in T-SQL without another table?
DougP
There will always be the same number of Field names such as SS, Fname, Lname, Addr for all of the information. in this examaple there are two records with four columns. The data is flexible so the column names will never be hardcoded using the "Create table" method, which is why the data is this way.
Can this be done in T-SQL without another table?
Code:
ColumnName Data
ID 1234
FName Fred
LName Flintstone
Addr 1234 BedRock Blvd
ID 4567
FName Barney
LName Rubble
Addr 9938 BedRock Blvd
I want to end up with the above data in a tabular format:
SS FName LName Addr
1234 Fred Flintstone 1234 BedRock Blvd
4567 Barney Rubble 9938 BedRock Blvd
DougP