Solved

export table with condition

Posted on 2001-09-17
4
824 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…

832 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