Hannu Krosing wrote:
>
> try making the orderevents view like this:
>
> create view orderevents as
> select rk.aufnr, sub.ts
> from rk150 rk,
> ( select ts from rk150 where aufnr = rk.aufr
> union
> select ts from rk151 where aufnr = rk.aufr
> union
> select ts from rk152 where aufnr = rk.aufr
> ) as sub
> ;
>
> this could/should force your desired behavior.
>
Hannu, does it work?
Few months ago I lost some time trying to create this kind of query and
I always got error, that subselect doesn't knows anything about upper
(outer?) table.
In this query you should get error:
"relation rk does not exist".
What version of postgres do you have?
Tomasz Myrta