Subject Invalid SQL ?
Author Christian Kaufmann
The following query works on my database:

select achssegmentid from achssegment union select gebietid from
gebiet

But if I use it like this I receive an error

select count(*) as N, ACHSSEGMENTID from DATA_FEA
where
not (ACHSSEGMENTID in
(select achssegmentid from achssegment union select gebietid from
gebiet))
group by ACHSSEGMENTID


SQL error code = -104 Token unknown - line 4, char 44 union

Do I need a view for the union ?

cu Christian