shashianireddy (11/4/2013)
Iam try this quarie but not display above format show as above
For the given data, it certainly does. Please post the data you're using where it doesn't.
Declare @tblTemp table ( ID int identity(1,1)
, houseno NVARCHAR(MAX)
)
Insert into @tblTemp
Select '3-13-1' union all
Select '3-13-3/a' union all
Select '3-13-3/b' union all
Select '3-13-2/a' union all
Select '3-13-4' union all
Select '3-13-6' union all
Select '3-13-5/a' union all
Select '3-13-4/c'
;
SELECT HouseNo
FROM @tblTemp
ORDER BY HouseNo
;
Results from above...
3-13-1
3-13-2/a
3-13-3/a
3-13-3/b
3-13-4
3-13-4/c
3-13-5/a
3-13-6
--Jeff Moden
Change is inevitable... Change for the better is not.