I have this table
And i need have this (In source table are thousands values)
How can i do that ?
Here is example database: http://sqlfiddle.com/#!3/4278d
Thank you.
sql server
I have this table
And i need have this (In source table are thousands values)
How can i do that ?
Here is example database: http://sqlfiddle.com/#!3/4278d
Thank you.
Best Answer
Assuming that each row in the source table only has either variable1, 2 or 3 populated, and there is only one such row for each combination, then this is probably the simplest approach:
SQLfiddle