Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problem with order by clause

Author  Topic 

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-09-04 : 08:43:06
Hi Every one, i have table data like

DECLARE @TEMP TABLE ( ID VARCHAR(255) )
INSERT INTO @TEMP SELECT '1'
INSERT INTO @TEMP SELECT '1.10'
INSERT INTO @TEMP SELECT '1.1.1'
INSERT INTO @TEMP SELECT '1.2'
INSERT INTO @TEMP SELECT '1.5'
INSERT INTO @TEMP SELECT '1.6.2'
INSERT INTO @TEMP SELECT '1.2.5.5'
INSERT INTO @TEMP SELECT '1.1.1.2.5'

SELECT * FROM @TEMP

I want Output like:
id:
---
1
1.1.1
1.1.1.2.5
1.2
1.2.5.5
1.5
1.6.2
1.10

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-04 : 09:10:16
Have you seen this:
http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/223ea4bb-c13f-4177-ba1c-f6f664585ee6


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -