Q

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.

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=
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

Dig deeper on Oracle and SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close