?
Solved

EXPDP   QUERY option  -  Is there anyway to continue to the next line for a parameter

Posted on 2014-10-09
5
Medium Priority
?
477 Views
Last Modified: 2014-10-09
I need to use expdp to export data using the query option.   The query I will be using is very long and I would like to be able to continue on the next line (actually multiple lines) within the parameter file.    This will make it much more readable.   Is there a way to do this?
0
Comment
Question by:ciphersol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
Stampel earned 2000 total points
ID: 40371091
You can have multiple lines as far as you follow this rule.

The preferred method of using QUERY parameter is in a parameter file is to put double quotes around the WHERE clause.

parameter file exp_emp.par contains,

TABLES:emp_salary
DUMPFILE=dump_dir
QUERY= emp_salary:"WHERE emp_id IN (SELECT id from emp
where join_date> to_date('2004-01-01','YYYY-MM-DD')
AND dept='SALSE')"
0
 

Author Closing Comment

by:ciphersol
ID: 40371239
Thank you.  That works.
0
 
LVL 7

Expert Comment

by:Stampel
ID: 40371409
I can not edit the post anymore.
Please add reference to  : http://shaharear.blogspot.fr/2008/09/using-query-parameter-in-expdpimpdp.html
My intend was not bad, i just prefer the solution inside the post than a link that can be broken in a few weeks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question