Dear list,
I'm trying to find the correct syntaxt for this, but I hit a syntax
error each time: either SQLite shokes on outer parenthesis or on union all.
(
select * from A where x in (subselectA)
left outer join
select * from B where y in (subselectB)
)
union all
( -- <-- error
select * from B where y in (subselectC)
left outer join
select * from A where x in (subselectD)
)
Union [all], except, intersect don't seem to accept parenthesis around
the left or right parts.
Of course a workaround could be to create two views then union all
them, but there must be a way to express this construct in a single
statement.
I don't want the statement to be interpreted this way:
select * from A where x in (subselectA)
left outer join
(
select * from B where y in (subselectB)
union all
select * from B where y in (subselectC)
)
left outer join
select * from A where x in (subselectD)
--
jcd
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users