> SELECT
>         r.id AS foo
>         , r.col_a
>         , r.col_b
>         , a.name AS a_name
>         , a.value AS a_value
>         , t.res_id AS t_res_id
>         , t.key AS t_key
>         , t.value AS t_value
>       FROM request r
> LEFT JOIN attribute a
>            ON a.req_id=r.id
> LEFT JOIN action t
>            ON t.req_id=r.id AND NOT(t.key='something' AND t.value='XXXX')
>      WHERE r.guid_id=1
>            AND r.status IS NULL
> ORDER BY foo
> 
> 
> It think you can simply add it to the ON-clause...

That excludes just the single row from the related set which than produces a
join with the offending record in table A and an incomplete set from table B.

What I had will work, I just think its rather ugly.

Thanks for all the help,
jlc
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to