Solved

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

Posted on 2014-10-09
5
434 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle encryption 12 72
SQL2016 to ORACLE11G linked-server 6 79
format dd/mm/yyyy parameter 16 59
Sorting a SQL script 5 41
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  â€¦
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

734 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