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 2000 Forums
 Transact-SQL (2000)
 A T-SQL Riddle...

Author  Topic 

mdelgado
Posting Yak Master

141 Posts

Posted - 2002-06-20 : 17:05:12
I have a table with one column named 'CustNo'. This table has 5 records as follows:

012345
032451
425130
031524
543210


I need to create a a view that looks at this table, picks the data apart (using substring or something...) and resorts it to look like this:

012345
012345
012345
012345
012345

Any ideas would GREATLY be appreciated.

Thanks

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-06-20 : 18:02:50
There are lots and lots of wasy to do this, which one you choose is up to you
[url]http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&q=sort+numbers+in+a+string+group%3Amicrosoft.public.sqlserver.*[/url]

HTH
Jasper Smith

Go to Top of Page
   

- Advertisement -