Rich Shepard <[EMAIL PROTECTED]> wrote:
  I cannot find the specific syntax on the web site's SELECT page nor
in Owens' book. It should not be as difficult to craft the statement as
I'm finding it to be.

  Here's what I want (with the sqlite3 error following):

 SELECT * from Fuzzyset as f
   INNER JOIN (SELECT num_ts from Variable as v
     WHERE f.parent=v.name AND f.comp=v.comp_name and
       f.subcomp=v.subcomp_name)

SQL error: near "as": syntax error

I get a different error: no such column "f.subcomp". The reason for this is that you use Fuzzyset fields in a subquery that's not coordinated with Fuzzyset.

What you want is something like this:

select f.*, v.num_ts
from Fuzzyset as f join Variable as v
on (f.parent=v.name and f.comp=v.comp_name and f.subcomp=v.subcomp_name);

or equivalently

select f.*, v.num_ts
from Fuzzyset as f join Variable as v
where f.parent=v.name and f.comp=v.comp_name and f.subcomp=v.subcomp_name;

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to