I'm embarrassed to have to ask for help on this query, but I am not
finding the solution in my local references (Celko's "SQL for Smarties, 3rd
ed", van der Lans' "Introduction to SQL, 4th ed") or by searching for
Google.

   I have two tables that should have the same number of rows, but one is 2
rows short and I'm trying to identify which rows exists in the first table
(Fuzzyset) that's missing from the second table (Rules).

   I thought that a right outer join might work with "NOT EXISTS" in the
WHERE clause, but I'm getting syntax errors. There are 3 attributes common
to the two tables: f.parent=Rules.var_name, f.subcomp=Rules.subcomp_name,
f.comp=Rules.comp_name.

   What I tried, among other attempts, was:

select name, parent, subcomp, comp from Fuzzyset, Rules where not exists
(Fuzzyset.parent=Rules.var_name and Fuzzyset.subcomp=Rules.subcomp_name and
Fuzzyset.comp=Rules.comp_name);

but this throws a syntax error.

   I'm sure that I've seen (and probably used) this type of query before so
I've no idea why the proper syntax is eluding me.

   A clue stick will be very helpful.

Thanks,

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to