Solved

export table with condition

Posted on 2001-09-17
4
852 Views
Last Modified: 2008-03-10
hello
How to export one user with conditional statement ie. I have lot of rows in each table and I want only particular rows from each table without using the concept creating temporary table. It is huge amount of data handling. I am using oracle 8.0
Plz give me solution as early as posiible..

Satya.
Netdecisions.
India
0
Comment
Question by:satya_in
[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
4 Comments
 
LVL 1

Expert Comment

by:kouke
ID: 6487870


You cannot export with query in 8.0. but you can create temporary table:
create table my_temp as select * from orig_table where.....
and then export that temporay table.


You can list all options by command 'exp help=y'
----
exp help=y

Export: Release 8.0.6.0.0 - Production on Mon Sep 17 18:03:51 2001

(c) Copyright 1999 Oracle Corporation.  All rights reserved.


You can let Export prompt you for parameters by entering the EXP
command followed by your username/password:

     Example: EXP SCOTT/TIGER

Or, you can control how Export runs by entering the EXP command followed
by various arguments. To specify parameters, you use keywords:

     Format:  EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
     Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
               or TABLES=(T1:P1,T1:P2), if T1 is partitioned table

USERID must be the first parameter on the command line.

Keyword  Description (Default)        Keyword      Description (Default)
--------------------------------------------------------------------------
USERID   username/password            FULL         export entire file (N)
BUFFER   size of data buffer          OWNER        list of owner usernames
FILE     output file (EXPDAT.DMP)     TABLES       list of table names
COMPRESS import into one extent (Y)   RECORDLENGTH length of IO record
GRANTS   export grants (Y)            INCTYPE      incremental export type
INDEXES  export indexes (Y)           RECORD       track incr. export (Y)
ROWS     export data rows (Y)         PARFILE      parameter filename
CONSTRAINTS export constraints (Y)    CONSISTENT   cross-table consistency
LOG      log file of screen output    STATISTICS   analyze objects (ESTIMATE)
DIRECT   direct path (N)
FEEDBACK display progress every x rows (0)
POINT_IN_TIME_RECOVER   Tablespace Point-in-time Recovery (N)
RECOVERY_TABLESPACES    List of tablespace names to recover
VOLSIZE  number of bytes to write to each tape volume

Export terminated successfully without warnings.
-----


You can use export/import, sqlloader or db_link to copy table to another database.

exp scott/tiger file=table_export.dmp tables=test_table

imp scott/tiger file=table_export.dmp full=y




0
 

Expert Comment

by:boruskung
ID: 6492704
Hi Satya,

You can try to create a database link for the two databases. Then use the

create table [table name] as
select * from [source table]

from oracle doc:
===============================================
The following statement defines a fixed-user database link named sales.hq.acme.com:
CREATE DATABASE LINK sales.hq.acme.com
   CONNECT TO hr IDENTIFIED BY hr
   USING 'sales';


Once this database link is created, you can query tables in the schema scott on the remote database in this manner:

SELECT * FROM employees@sales.hq.acme.com;
=================================================

command to copy your table.

besides you may have to modify the access priviledge.

Borus
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7262058

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Accepted Solution

by:
Jgould earned 0 total points
ID: 7292768
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

Independent Software Vendors: 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

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

738 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