On Feb 3, 2013, at 10:55 AM, e-mail mgbg25171 <mgbg25...@blueyonder.co.uk> wrote:
> (select * from calls where by_or_on <> '') c For the record… one thing to watch out… the empty string (aka '') and null are not the same… so if you are looking to eliminate nulls you have to use 'foo is not null'… as oppose to "foo != ''" for empty strings… in general, if you wish to maintain your sanity, do *not* use empty strings… just saying… http://en.wikipedia.org/wiki/Null_(SQL) All in all, you could rewrite your join along the following lines: select firms.* from firms join calls on calls.firm_id = firms.id and nullif( calls.by_or_on, '' ) is not null -- FIXME: suspicious use of the empty string... _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users