Home » RDBMS Server » Server Utilities » How to use subquery in query parameter of exp command (Solaris)
How to use subquery in query parameter of exp command [message #428774] Fri, 30 October 2009 00:08 Go to next message
ashish29
Messages: 1
Registered: October 2009
Junior Member

I am trying to export certain rows of a table using exp command

exp TRA/simple@TRA consistent=y indexes=n constraints=n tables=TRA$EMPL query=\"where deptid in \(select objectid from Person\)\" file=/dbase/dump/archv.2009-10-2917:24:00.dmp

but im getting an error

LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully

Pls help!
Re: How to use subquery in query parameter of exp command [message #428820 is a reply to message #428774] Fri, 30 October 2009 03:12 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Try modifying the syntax. On Windows you can do it with the following, search around this solution:
C:\>exp michel/michel file=t.dmp tables=dept query="where deptno not in (select deptno from emp)"
LRM-00112: multiple values not allowed for parameter 'query'

EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully

C:\>exp michel/michel file=t.dmp tables=dept query="'where deptno not in (select deptno from emp)'"

Export: Release 10.2.0.4.0 - Production on Fri Oct 30 09:11:11 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining
and Real Application Testing options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table                           DEPT          1 rows exported
Export terminated successfully without warnings.

Regards
Michel
Previous Topic: space problem in imp utlity in oracle10g
Next Topic: hot to copy all data to a new schema
Goto Forum:
  


Current Time: Sat Dec 03 01:18:05 CST 2016

Total time taken to generate the page: 0.11277 seconds