Ask the Expert

Where clause returning entire table

I am trying to export a number of tables with a where clause. I ran the statement in SQL and the format is correct. export_problems.par contains my table names. It runs but gives me the entire table, 659,000 rows, instead of 4,400.
COMPRESSED_FILE=$DATADIR/perprod_hd_problem.dmp.Z
PARFILE=$DATADIR/export_problem.par
query="where add_months(close_time, 15) < sysdate"
DIRECT=

    Requires Free Membership to View

I was able to export a subset of my table wo_3068_def_est using the following parfile for my export:
FILE="s:misscriptsexport_sql.dmp"
LOG="s:misscriptsexp_export_sql.log"
TABLES=('R11.WO_3068_DEF_EST')
QUERY="where csi_id = 115"
In one schema the record count was 45,381, and in my other schema where I imported the data my record count was 10,276.

Since my parfile looks very similar to yours, the problem does not appear to be with your parfile.

This was first published in July 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: