Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Keith Medcalf
sers-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of YAN HONG YE > Sent: Friday, 15 June, 2012 03:57 > To: sqlite-users@sqlite.org > Subject: [sqlite] order by clause should come after union not before > > select * from hbc order by cmc desc limit 10

Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Igor Tandetnik
YAN HONG YE wrote: > select * from hbc order by cmc desc limit 10 > union > select * from hbc where qph>0 > union > select * from hbc where hctl=1 > > this sql cmd cause the error: > order by clause should come after union not before select * from hbc where rowid in (select rowid from hbc order

Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Jay A. Kreibich
On Fri, Jun 15, 2012 at 08:10:20AM -0400, Kevin Benson scratched on the wall: > On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE wrote: > > > > select * from hbc order by cmc desc limit 10 > > union > > select * from hbc where qph>0 > > union > > select * from hbc where hctl=1 > > > > this sql cmd ca

Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Kevin Benson
On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE wrote: > > select * from hbc order by cmc desc limit 10 > union > select * from hbc where qph>0 > union > select * from hbc where hctl=1 > > this sql cmd cause the error: > order by clause should come after union not before > http://www.sqlite.org/lan

Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Simon Slavin
On 15 Jun 2012, at 10:56am, YAN HONG YE wrote: > select * from hbc order by cmc desc limit 10 > union > select * from hbc where qph>0 > union > select * from hbc where hctl=1 > > this sql cmd cause the error: > order by clause should come after union not before Yes. The UNION clauses you're

[sqlite] order by clause should come after union not before

2012-06-15 Thread YAN HONG YE
select * from hbc order by cmc desc limit 10 union select * from hbc where qph>0 union select * from hbc where hctl=1 this sql cmd cause the error: order by clause should come after union not before ___ sqlite-users mailing list sqlite-users@sqlite.or