try this

copy the first part of the field in for example "Orderfield1" and the 
second part of the field in for example "Orderfield2". Then you can sort 
the result as you want.

"Original Field"
01 A...
02 B...
03 C...

Orderfield1 Orderfield2
01             A... 
02             B...
03             C...

Then change the Title of Orderfield1 and Orderfield2 in "Original Field".

Am Samstag, 14. Juni 2014 08:39:32 UTC+2 schrieb Kenneth:
>
> Hi,
>
> I have a table that contains 5 items. Usually I order them by product 
> name. Now I'd like to order them so a specific ID is first and then the 
> rest. As everything else is ready I'm looking into making the SQL query do 
> the ordering. 
>
> I found a posting ( 
> https://groups.google.com/forum/?fromgroups#!searchin/web2py/orderby$20$20case/web2py/B9iM-r1rV0A/jPMBmoSv2kgJ
>  
> ) where CASE was used with orderby but I just couldn't understand how to 
> get it working. 
>
> Is this the way or is there an other way to do this?
>
>
> Kenneth
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to