[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-17 Thread Niphlod
nope. On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: > > Hi there :) > > I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project > and I have a question about sorting. In PostgreSQL, when I execute a > SELECT, I can specify 'ORDER BY x ASC NULLS FIRST', which is n

[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-23 Thread pysab
ok, thanks. Raw SQL is my friend then ;) On Wednesday, 17 June 2015 09:18:38 UTC+2, Niphlod wrote: > > nope. > > On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: >> >> Hi there :) >> >> I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project >> and I have a question

Re: [web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-23 Thread Michele Comitini
you can try building the query with DAL like the following: sql = db(db.t1)._select(orderby=[db.t1.f1]) db.executesql(sql + ' NULLS FIRST') 2015-06-22 10:43 GMT+02:00 pysab : > ok, thanks. Raw SQL is my friend then ;) > > > > On Wednesday, 17 June 2015 09:18:38 UTC+2, Niphlod wrote: >> >> nope