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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Database Migration

Re: Oracle Database Migration

From: TurkBear <jvgreco_at_nospamprimenet.com>
Date: 1997/09/05
Message-ID: <341131ea.248499483@news.primenet.com>#1/1

"Chris Hamilton" <Christopher.H.Hamilton_at_usace.army.mil> wrote:

>
>Andy Spamer <as_at_simdell.co.uk> wrote ...
>
>re: migration to SQL Server...
>
>> I can load a database into SQLServer if i can get an ASCII output of the
>> database so what i really need to know is Are their any utilities in
 Oracle
>> that will create a CSV ASCII file?
>
>Yes, you need to use SQL*Plus. It is a standard part of any Oracle
>distribution. It allows you to write SQL scripts to manipulate the data.
>If you're on a Unix platform, look for the binary "sqlplus" in the
>$ORACLE_HOME/bin directory. Output can be sent to the screen or to ASCII
>"spool" files. By adding commas into your select statement, you can make
>CSV files.
>
>For instance, to make a file called dept.csv from the DEPT table,
>
>set linesize 80;
>set pagesize 0;
>set heading off;
>
>spool dept.csv;
>
>select to_char(deptno) || ',' || dname || ',' || loc
>from dept;
>
>spool off;
>
>> I have heard their is a utility called SQLLoader, but is this what i
 need,
>> and if so can any one supply me with the syntax?
>
>SQL*Loader is for putting ASCII data INTO an Oracle database. A handy
>utility, but not what you're looking for.
>
>Chris
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>Chris Hamilton - Oracle Database Admin.
>AVANCO Intl. / US Army Corps of Engineers
>Christopher.H.Hamilton_at_usace.army.mil
>http://www.serve.com/cowpb/chamilton.html

If you have a lot of fields, the SqlPlus method is prone to errors ( in typing) -- try a report generator that allows exports in different file formats..... I use Crystal reports, but most report writers allow

export ( or save as... ) to an CSV file.

John Greco
Oracle DBA Received on Fri Sep 05 1997 - 00:00:00 CDT

Original text of this message

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