Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
ID | name | Rollnumber| ... |...| ...| ...|
--------------------------------------------
1 vinod 101 _ _ _ _
2 shravan 102 _ _ _ _
3 ram 103
4 Teja 104
5 shekar 105
how divide groups in single table?
mens ID is one group
name and rollnumber 2nd group
.....
Posted
Comments
Afzaal Ahmad Zeeshan 18-Dec-14 11:10am    
You divide single tables into groups, not groups into single groups. Did you mean to merge?
iamvinod34 18-Dec-14 11:29am    
yes,single tables into groups
plz tell . sql query and user click on button create table with groups divide
plz help sir
Maciej Los 18-Dec-14 14:33pm    
Do not repost: How to create groups in one table sqlserver?[^]!!!
Rather improve your previous question.

I'd suggest to show us expected output.
Tomas Takac 18-Dec-14 16:56pm    
Oh, a new post. Man I still have no idea what you are trying to achieve. Show us the expected results, as I already suggested in your previous post.

1 solution

Please, read my comment to the question.

If i understand you well...
If you want to return 2 columns, instead of 3, use this query:
SQL
SELECT ID AS FirstColumn, [name] + CONVERT(VARCHAR(10), rollnumber) AS SecondColumn
FROM TableName
 
Share this answer
 
Comments
Tomas Takac 18-Dec-14 16:57pm    
+4 for the effort, this is as good guess as any
Maciej Los 18-Dec-14 16:57pm    
Thank you, Tomas ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900