Home » RDBMS Server » Server Utilities » Export/Import part of a table
Export/Import part of a table [message #69796] Thu, 07 March 2002 10:20 Go to next message
Shmuli
Messages: 3
Registered: January 2002
Junior Member
Hi,
I'm trying to use parameter driven export and import, and I want to take out specific rows from one database and insert them into a same table in another database.Though I don't know the syntex of how to put a select statement into the export or import statement(ex:exp system/manager file=C: etc....).
Thank Anyone who is able to help me!
Shmuli
Re: Export/Import part of a table [message #69797 is a reply to message #69796] Thu, 07 March 2002 10:54 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
You have to escape the quotes. This example uses the JOB table and select MANAGER. Try this:

exp SCHEMA/PASSWORD tables=emp query="where job='MANAGER'" file=exp.dmp log=exp.log

There is not a QUERY parameter for import.
Re: Export/Import part of a table [message #69807 is a reply to message #69796] Fri, 08 March 2002 05:43 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
To import you would use:

imp system/PASSWORD fromuser=SCHEMA touser=SCHEMA tables=COMPANY IGNORE=Y

Where fromuser must have been the schema exported and touser must be a valid user in the target DB.
Re: Export/Import part of a table [message #69809 is a reply to message #69796] Fri, 08 March 2002 05:52 Go to previous message
Grant
Messages: 578
Registered: January 2002
Senior Member
Of course you need to give it a dump file name:

imp system/PASSWORD fromuser=SCHEMA touser=SCHEMA tables=COMPANY IGNORE=Y file=dumpfile.dmp log=logfile.log
Previous Topic: minextents
Next Topic: Rename a database
Goto Forum:
  


Current Time: Thu Mar 28 06:52:52 CDT 2024