How to use a Query in the Export utility [message #70674] |
Fri, 12 July 2002 06:10 |
sahaslad
Messages: 23 Registered: May 2002
|
Junior Member |
|
|
Hi,
How do i use a Query to fire in a Export utility.
i have tried like this in the command prompt:
exp scott/tiger Query=select room_no from test where room_id=5895
It returns me error as:
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 unsucessfully
Thanks for ur help.
|
|
|
Re: How to use a Query in the Export utility [message #70675 is a reply to message #70674] |
Fri, 12 July 2002 06:18 |
Grant
Messages: 578 Registered: January 2002
|
Senior Member |
|
|
Depends on the OS but you may need to escape it. Here are a couple examples. You will need to play with it in different combo's to see waht works for you. You can also put it in a parameter file which changes the syntax. This was extracted from "Query= Syntax in Export in 8i" in MetaLink.
UNIX syntax:
----------------
- Example:
Export table data from DEMO.EMP that only includes FRAN like last
names.
exp demo/demo query="where lname like 'FRAN%'" tables=emp
file=exp.dmp log=exp.log
- Example: If you want to export multiple tables and use the QUERY parameter
in the export, the WHERE clause must be applicable to all tables.
Export all data for employees and customers residing in the state
of New York.
exp demo/demo query="where st='NY'" tables=(emp,cust)
file=exp.dmp log=exp.log
WINDOWS NT / 2000 and NETWARE syntax:
---------------------------------------------------------
Under WindowsNT or Windows 2000, as well as NetWare, the following syntax applies:
Example:
EXP demo/demo tables=test file=exp1.dmp query="""where enum >12345"""
NOTE: There should be NO spaces surrounding the double quotes in the
following statement. There are NO spaces between the double quotes either.
If you are going to use a 'PARFILE' parameter instead, then use the following syntax in the
Parfile:
file=exp66.dmp
query="where enum > 12345"
tables=(test)
log=log66.txt
userid=demo/demo
|
|
|
|
|
|