Carved in mystic runes upon the very living rock, the last words of
Dylan Parry of alt.
www.webmaster make plain:
> I have a database full of documents and each section within a document
> is given an ID like "1.0", "1.1", "1.2" and so on. The datatype is
> varchar (I wasn't sure if a better type exists?).
>
> Now this is fine until I get to "1.10" which is then logically between
> "1.1" and "1.2" but obviously, in the document it should be after
> "1.9". Is there any way I can retrieve data from the database using
> this sort of /logical to me, but not to a computer/ manner?
If SQL Server has the CAST() function and the DECIMAL type, you could
try that:
order by cast(id as DECIMAL);
--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/