[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 883
  • Last Modified:

export table with condition

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
satya_in
Asked:
satya_in
1 Solution
 
koukeCommented:


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
 
boruskungCommented:
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
 
nico5038Commented:

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
 
JgouldCommented:
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now