Boris Klug wrote:
> create view orderevents as
> select ts, aufnr from rk150
> union
> select ts, aufnr from rk151
> union
> select ts, aufnr from rk152;
I lost some time and I didn't find valid solution for this kind of query :-(
I solved it (nice to hear about better solution) using table inheritance.
create table rk_master(
fields...
fields...
);
create table rk150 () inherits rk_master;
create table rk151 () inherits rk_master;
create table rk152 () inherits rk_master;
now you can just create simple view:
select ts, aufnr from rk_master;
Regards,
Tomasz Myrta