Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oddness Creating Views?
Hi All,
How come I can do this:
select * from pdtable_12_1, pdtable_12_99
Which returns all the rows in all the tables between 1 & 99 in the sequence.
But I cannot do this:
create view pdtable_12_All as
select * from pdtable_12_1, pdtable_12_99
which gives the error: "ORA-00957 duplicate column name" and points at
the
'*'
Further I can do this:
create view pdtable_12_All as
select unit_code from pdtable_12_1
But cannot do this:
create view pdtable_12_All as
select unit_code from pdtable_12_1, pdtable_12_99
which gives the error: "ORA-00918 column ambiguously defined" and
points at
'unit_code' (the column name).
I know I join all the tables with a UNION but I don't want to do that as obviously the resulting dataset is un-updateable. The tables are actually partions but Oracle doesn't recognise them as such because of the way the 3rd party software that created the tables did its job.
Any ideas?