On 7 Oct 2011, at 2:19pm, Igor Tandetnik wrote: > SQLite has a non-standard extension whereby aliases assigned to expressions > in the SELECT clause may be used in the WHERE and other clauses: > > select 1+2 as alias from mytable where alias > 0;
Arghhhhhhhh ! Okay, so I guess the form > select count(*) from ( > select ... > ); is necessary. But that defeats the point of me doing it in the first place: I was hoping that COUNT(*) would be less resource-hungry than the real query, and I suppose this form doesn't realise it doesn't need the values. Bah. Okay, I'll abandon that idea, then. Thanks, Igor. You saved me some hugely annoying support calls long after the program was in the field. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users