Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle exports to file, still unwanted lines

Re: Oracle exports to file, still unwanted lines

From: gazzag <gareth_at_jamms.org>
Date: 7 Apr 2005 09:22:07 -0700
Message-ID: <1112890927.429704.311740@f14g2000cwb.googlegroups.com>


joostvanpoppel wrote:
> I just tried your suggestions. Unfortunately the file stays like:
> SQL> SELECT * FROM deb_export_omgezet;
> 7000;LH;Louis;1;3
> 7001;TH;Theo;1;3
> 7002;SJ;Sjaak;1;3
> 7003;NR;Nico;1;3
> 7004;MH;Martin;1;3
> 7005;JP;Joost;1;3
> 7006;GR;Gerard;1;3
> 7007;FA;Fahrad;1;3
> 7008;EB;Epi;1;3
> 7009;RE;RE;1;3
> 7010;TP;Tom;1;3
> SQL> SPOOL OFF
>
>
> Anything else that could take out those sql-statements??
>
> thanks

Try the following:

  1. Create a file called dump_deb_export_omgezet.sql, for example, containing the following lines:

set pagesize 0
set feedback off
SELECT * FROM deb_export_omgezet;

2. Open up a command-line window (DOS box), change to the directory where you saved the script you made in step 1. Then run the following on the command-line:

sqlplus -s "<username>/<password>@<db_name>" @dump_deb_export_omgezet.sql > c:\deb_exp.txt

The above should all be on the same line and is saying: start SQL*Plus in silent mode with the following connect details (between the quotes) and run the script dump_deb_export_omgezet.sql directing the output to c:\deb_exp.txt.

NOTE:

  1. The connect string (username, password and database name) should be enclosed in the double quotes (").
  2. There must be a space between the last quote (") and the @dump_deb_export_omgezet.sql.
  3. The greater-than sign (>) redirects the output from the screen to the filename that you specify after it. You won't see anything appear on the screen but, when your command prompt returns, the file should contain the data you require without the SQL statements.

Hope this helps. Received on Thu Apr 07 2005 - 11:22:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US