export from 2 tables with different columns [message #71852] |
Wed, 22 January 2003 06:25 |
Kieron
Messages: 6 Registered: October 2000
|
Junior Member |
|
|
Hi,
Here is the problem.
2 Tables:
SQL> create table emp (entity varchar2(2));
Table created.
SQL> create table company (country varchar2(2));
Table created.
SQL> insert into emp values('AU');
1 row created.
SQL> insert into emp values('GB');
1 row created.
SQL> insert into company values ('AU');
1 row created.
SQL> insert into company values ('GB');
1 row created.
The question is, how to export these two tables in one export command (into one dump file), with only the 'AU' data.
I am aware of the query parameter for the export command, but this only allows you to have the same column in both tables, ie.
exp query="where entity='AU'" tables=emp,company
When it gets to the company table it errors with a unknown column error.
A tricky way to solve this? Without creating the column and copying the data into the new column.
Thanks and Regards,
Kieron
|
|
|
|
Re: export from 2 tables with different columns [message #71856 is a reply to message #71852] |
Wed, 22 January 2003 07:11 |
Kieron
Messages: 6 Registered: October 2000
|
Junior Member |
|
|
A view was my original idea, but it seems that export does not allow one to export from a view.
I am aware that it cannot be done in SQL*Plus, I was just wondering if anyone had any bright ideas.
Thanks for the suggestion,
Regards,
Kieron
|
|
|
|