Right you are. For some reason I was sure that existed. How about
defining the column as text and doing "ORDER BY <field> + 0.0". 

That won't use an index though. If you need an index you'll have
to define a collation sequence that sorts numericly.

--- [EMAIL PROTECTED] wrote:

> I tried that but got:  "no such collation sequence: NUMERIC"
> 
> 
> 
> 
> 
> 
>                                                                               
>                   
>                  
>                       "Dan Kennedy"                                           
>                   
>                  
>                       <[EMAIL PROTECTED]        To:       
> [email protected]                
>                  
>                       o.com>                   cc:                            
>                   
>                  
>                                                Subject:  Re: [sqlite] ORDER 
> BY question         
>                  
>                       07/26/2005 02:48                                        
>                   
>                  
>                       PM                                                      
>                   
>                  
>                       Please respond to                                       
>                   
>                  
>                       sqlite-users                                            
>                   
>                  
>                                                                               
>                   
>                  
>                                                                               
>                   
>                  
> 
> 
> 
> 
> 
> 
> --- [EMAIL PROTECTED] wrote:
> 
> >
> > Hello,
> >
> > I'm using sqlite3 and have a list of numbers I'd like returned sorted in
> > increasing order:
> > 1 1.1 1.10 1.11 1.9 10 11 9 12
> >
> > However, if their column is defined as numeric, the 1.10 gets converted
> to
> > 1.1 (which is not what I want) and the result (using ORDER BY) is:
> > 1 1.1 1.1 1.11 1.9 9 10 11 12
> >
> > I tried defining the column as a text and while the 1.10 is preserved,
> but
> > I get dictionary-style results:
> > 1 1.1 1.10 1.11 1.9 10 11 12 9
> 
> You could define the column as text and use "ORDER BY <field> COLLATE
> NUMERIC".
> 
> 
> 
> 
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
> 
> 
> 
> 
> 
> 
> The information transmitted is intended only for the person(s)or entity 
> to which it is addressed and may contain confidential and/or legally 
> privileged material. Delivery of this message to any person other than 
> the intended recipient(s) is not intended in any way to waive privilege 
> or confidentiality. Any review, retransmission, dissemination or other 
> use of, or taking of any action in reliance upon, this information by 
> entities other than the intended recipient is prohibited. If you 
> receive this in error, please contact the sender and delete the 
> material from any computer.
> 
> For Translation:
> 
> http://www.baxter.com/email_disclaimer
> 
> 



                
__________________________________ 
Yahoo! Mail for Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 

Reply via email to