Solved

export table with condition

Posted on 2001-09-17
4
800 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
Comment Utility


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
Comment Utility
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
Comment Utility

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
Comment Utility
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now