Re: [sqlite] Search a Select in another Select

2009-09-01 Thread Terence Lorenzo
yes I am aware of that. word and word1 are variables in my case. I didnt wish to create confusion so I appreciate the comment cheers Igor Tandetnik wrote: > > Terence Lorenzo wrote: >> select K1.keyword >> from emaildata as E1 >> INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique >>

Re: [sqlite] Search a Select in another Select

2009-09-01 Thread Igor Tandetnik
Terence Lorenzo wrote: > select K1.keyword > from emaildata as E1 > INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique > INNER JOIN keywords as K1 on K1.id = L1.id_keyword > WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' The second test is redundant. Everything that matc

Re: [sqlite] Search a Select in another Select

2009-08-31 Thread Terence Lorenzo
Thanks for the help. I suspected I had to use a secondary select, though I want sure how to use it For others, here is the completed sql select E1.datetime,R1.email,R2.email,subject,E1.[size],E1.offset,C1.id_block,C1.[size],C1.compression,C1.offset from ( select distinct E2.id from emaildata

Re: [sqlite] Search a Select in another Select

2009-08-31 Thread Darren Duncan
Terence Lorenzo wrote: > I have these 2 queries > > select K1.keyword > from emaildata as E1 > INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique > INNER JOIN keywords as K1 on K1.id = L1.id_keyword >WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' > > This qu

[sqlite] Search a Select in another Select

2009-08-31 Thread Terence Lorenzo
I have these 2 queries select K1.keyword from emaildata as E1 INNER JOIN keylocations AS L1 on L1.id_unique = E1.id_unique INNER JOIN keywords as K1 on K1.id = L1.id_keyword WHERE K1.keyword LIKE '%word%' or K1.keyword LIKE '%word2%' This query finds all matching keywords select