Group Numbers based on Level in sql server database : Hi I have requirement in sql server database where i have to group the data as mentioned below. If the Level is more than 2 then it has to be grouped under level 2 (ex: 1.1.1,1.1.2 are rolled up under 1.1.) and if there isn't any level 2 available then have to create a second level based on the level 3 Numbers (ex: 1.2.1)


Source       Required
Column		Col1	Col 2
1		     1	
1.1.		1.1.	
1.1.1.		1.1.	1.1.1.
1.1.2.		1.1.	1.1.2.
1.2.1		1.2.	1.2.1
1.3.		1.3.	
1.3.1.		1.3.	1.3.1.
1.3.2.		1.3.	1.3.2.
1.4.1.		1.4.	1.4.1..


Thanks 