Solved

export and import of some columns in a table

Posted on 2009-07-01
1
929 Views
Last Modified: 2013-12-19
experts,

i have a requirement to export two columns of table and import in to another table. i am not sure this can be done by using export and import operation.
i tried with export i got some errors.

here is my parameter file and error log file

please help me how can i export only selected columns in a table.


buffer=10000000
file=export_txn_200903.dmp
log=export_txn_200903.log
tables=cdsvzw.txn:txn_200903
query="SELECT sid, eventid
FROM cdsvzw.txn partition (txn_200905)
where type||method in ('DL2','DL4','DL5','DL3')
and item_name not in
('Backup Assistant',
'VZ Navigator',
'Mobile IM',
'V CAST Music Player',
'V CAST MTP Sync',
'V CAST',
'Mobile Email',
'Get It Now Search',
'VZW Tones Deluxe 3.5',
'V CAST Song ID',
'Sony Music Box',
'Dashboard',
'VZW Tones Deluxe 3.2',
'VZW Tones Deluxe')"
rows=yes
compress=n
constraints=n
grants=n
statistics=none
triggers=n
feedback=3000
 
error  log file
 
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in UTF8 character set and AL16UTF16 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
Note: constraints on tables will not be exported
 
About to export specified tables via Conventional Path ...
Current user changed to CDSVZW
. . exporting table                            TXN
. . exporting partition                     TXN_200903
EXP-00056: ORACLE error 933 encountered
ORA-00933: SQL command not properly ended
Export terminated successfully with warnings.

Open in new window

0
Comment
Question by:pavan27
1 Comment
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 500 total points
ID: 24758239
Any reason you are using export in the first place? Are they in separate databases?

I would simply create a temporary table with just the 2 columns, export that, then import into the destination, and use it to insert into the final table.

create table t as select col1, col2 from orig_tbl;

-- export t
-- import t

insert into new_tbl(colx, coly) select col1, col2 from t;

etc.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
join 2 views with 5 conditions 3 61
ORA-04071: missing BEFORE, AFTER or INSTEAD OF keyword 2 65
form builder not starting 3 56
SQL2016 to ORACLE11G linked-server 6 28
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

821 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