Hi,

MS SQL Server

ORDER BY

CASE 
WHEN ISNUMERIC(X) THEN 
CONVERT(NUMERIC, X) 
ELSE 
'DUNNO WHAT TO DO FOR ROMAN NUMERALS.. MAYBE WRITE YOURSELF A FUNCTION
TO CONVERT THEM TO NUMERICS OR ASSIGN THEM SOME GENERIC NUMBER'
END

Scott Thornton, Programmer
Application Development
Information Services and Telecommunications
Hunter-New England Area Health Service
Phone  RNH +61 2 49236078 JHH +61 2 49214193 
Fax       +61 2 49214191

[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 02/15/05 4:58 PM >>>
evening all

i've got an application for describing documents. each document has a
docNo, which can be either numeric (1.1) or text (iv). the docNo DB
column is a varchar.

i want to pull a numeric sort on the docNos, BUT, they way the
documents have been numbered, 1.11 has to come after 1.2. (i.e. 1.11
== one point eleven)

is there a rational way of doing this?
or am i going to have to pull some serious h4cks to get this done,
like sorting left of the decimal relative to the right? eww.

anybody, anybody?
G

---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to