473,406 Members | 2,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Oracle export table to ascii

Hi,

I try to export a table from sqlplus to a ascii file like this:
select col1 || ';' || col2 || ';' || ..... || ';' || colN
from mytable ;

When the table is not so wide, the above query is not so large and the
export is succesfull.
But when the table is wide, the query becomes over 1024 characters and
I get the following error

ORA-00923: FROM keyword not found where expected

How do I export those wide tables?

Best regards
Raoul
Jul 19 '05 #1
4 13044
G M
Try to write your query into multiple lines:

select col1 || ';' || col2 || ';' || ..... colK
|| ';' || col(K+1) || ';' || ..... || ';' || colN
from mytable ;

HTH.

Guang

ra***********@wanadoo.nl (R.A. Joemman) wrote in message news:<e4**************************@posting.google. com>...
Hi,

I try to export a table from sqlplus to a ascii file like this:
select col1 || ';' || col2 || ';' || ..... || ';' || colN
from mytable ;

When the table is not so wide, the above query is not so large and the
export is succesfull.
But when the table is wide, the query becomes over 1024 characters and
I get the following error

ORA-00923: FROM keyword not found where expected

How do I export those wide tables?

Best regards
Raoul

Jul 19 '05 #2
"R.A. Joemman" <ra***********@wanadoo.nl> wrote...
Hi,

I try to export a table from sqlplus to a ascii file like this:
select col1 || ';' || col2 || ';' || ..... || ';' || colN
from mytable ;
(snip)
How do I export those wide tables?

Best regards
Raoul


Hi Raoul,

another solution that might work for you:
use the sql*plus command 'SET COLSEP'.

hth,
Guido
Jul 19 '05 #3
zl***@hotmail.com (G M) wrote in message news:<50**************************@posting.google. com>...
Try to write your query into multiple lines:

select col1 || ';' || col2 || ';' || ..... colK
|| ';' || col(K+1) || ';' || ..... || ';' || colN
from mytable ;

HTH.

Guang

ra***********@wanadoo.nl (R.A. Joemman) wrote in message news:<e4**************************@posting.google. com>...
Hi,

I try to export a table from sqlplus to a ascii file like this:
select col1 || ';' || col2 || ';' || ..... || ';' || colN
from mytable ;

When the table is not so wide, the above query is not so large and the
export is succesfull.
But when the table is wide, the query becomes over 1024 characters and
I get the following error

ORA-00923: FROM keyword not found where expected

How do I export those wide tables?

Best regards
Raoul

Thank you, this works for me.
Raoul
Jul 19 '05 #4
"Guido Konsolke" <Gu************@triaton.com> wrote in message news:<10***************@news.thyssen.com>...
"R.A. Joemman" <ra***********@wanadoo.nl> wrote...
Hi,

I try to export a table from sqlplus to a ascii file like this:
select col1 || ';' || col2 || ';' || ..... || ';' || colN
from mytable ;

(snip)

How do I export those wide tables?

Best regards
Raoul


Hi Raoul,

another solution that might work for you:
use the sql*plus command 'SET COLSEP'.

hth,
Guido


Thank you for this solution, it works for me.
Raoul
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
1
by: tomg | last post by:
I am able to export an MS-Access table to Oracle if that table does not exist there. I would like to append data to the Oracle table, but I get the Oracle message "Error--00955 Name is already...
3
by: premmehrotra | last post by:
I am using Access 2000 and Oracle 9.2.0.x on a Windows 2000. I have setup Oracle 9.2 ODBC Driver (I have not yet figured how to set Microsoft's Oracle ODBC driver). I am exporting a table from...
1
by: shaguna.dhall | last post by:
I need to migrate Unicode data from MS Access to Oracle. Have tried the following: -Exported the Access tables to csv/txt, but these files were generated in ANSI encoding, and the Unicode data...
3
by: azzi2000 | last post by:
This should be rather simple. I have a query using different link tables and 2 parameters. The query works perfect. However I need to export or save the result in an Access table in order to...
3
by: anitak | last post by:
Hi, I would like to know if Oracle provides any feature to import data in ASCII/XML files directly. I would not wish to go for Oracle import in Binary format. I found such provision...
4
by: Uik | last post by:
Hi all, I have a bunch of tables (peopleSoft tables) and i want to migrate them to an Oracle 10i server. I'm looking for a fast process like an Export from DB2 (MVS z/OS V7) and a load data to...
3
by: t3chn0n3rd | last post by:
Does anyone know how to export data from an Oracle database to a DB2 database?
4
by: R.A. Joemman | last post by:
Hi, I try to export a table from sqlplus to a ascii file like this: select col1 || ';' || col2 || ';' || ..... || ';' || colN from mytable ; When the table is not so wide, the above...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.