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)
 Convert for Sort

Author  Topic 

JAdauto
Posting Yak Master

160 Posts

Posted - 2008-03-19 : 12:43:49
I have a field in a table that is Nvarchar 50 that stores member numbers, which can be alpha-numeric. I am trying to do a sort for reporting.

The field contains numbers from 00001-99999. I have put a condition where I would like all numbers < 01000. However, this client has inserted an alpha character in the middle of thier numbers less then 1000. (numbers such as 00B08 or 00C09). I would like these to be included in the condition I put above (<01000), but they can be all lumped together at the bottom. I just need them to be included if possible and I have no idea if this is even possible.

If you have any advise, I would greatly appreciate it.

Thanks,
JAdauto

jrogers
Starting Member

34 Posts

Posted - 2008-03-19 : 15:21:17
In your WHERE expression you can have
WHERE (numberColumn < 01000 or isNumberic(numbercolumn) <>1)
Go to Top of Page
   

- Advertisement -