I have a table with data as follows. Name Size ---------------- A 1 B 2 C 1 D 1 E 3 F 2 I have to write an SQL (sql server) which will return 3(as there are 3 types of sizes are in the table) tables. The number of produced table can be increased by inserting new size data in the main table. The result of the required SQL should be as follows:- Name Size ---------------- A 1 C 1 D 1 Name Size ---------------- B 2 F 2 Name Size ---------------- E 3 Is there any easy way to produce the result without using any loop in the SQL?
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)