<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to export Oracle Data in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924900#M817795</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;AS every one suggested, you can write the SQL to extract the data in the format you want and spool the out put to a file.&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;Download a free version of TOAD from &lt;A href="http://www.toadsoft.com" target="_blank"&gt;http://www.toadsoft.com&lt;/A&gt; and the executable is just 3.5MB. Once you downloaded all you need to access the database is an entry in the tnsnames.ora in ORACLE_HOME directory on your PC and connect tot he database. The export function in TOAD has a facility to save the exported data of the table in various formats (excel, txt, dmp...)files. So if your table is large, TOAD will be the best option for you.</description>
    <pubDate>Thu, 13 Mar 2003 04:53:11 GMT</pubDate>
    <dc:creator>Indira Aramandla</dc:creator>
    <dc:date>2003-03-13T04:53:11Z</dc:date>
    <item>
      <title>How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924890#M817785</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How can I export oracle table to file which is comma-seperated that can use tools like excel to see data ?&lt;BR /&gt;I understand that exp command only work for Oracle imp.&lt;BR /&gt;Thank in advance</description>
      <pubDate>Wed, 12 Mar 2003 07:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924890#M817785</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2003-03-12T07:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924891#M817786</link>
      <description>One simple way is to write a SQL query, something like...&lt;BR /&gt;&lt;BR /&gt;set head off&lt;BR /&gt;set feed off&lt;BR /&gt;set pages 0&lt;BR /&gt;&lt;BR /&gt;select field1||','||field2||',' ...||fieldn from table;&lt;BR /&gt;&lt;BR /&gt;Watch out for data that contains commas though!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Wed, 12 Mar 2003 08:05:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924891#M817786</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2003-03-12T08:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924892#M817787</link>
      <description>Thanks John but I have huge table that my requirement is I want the output as a file.</description>
      <pubDate>Wed, 12 Mar 2003 08:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924892#M817787</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2003-03-12T08:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924893#M817788</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;You could issue an select statement on the table and spool the output to a text file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; spool c:\test.txt&lt;BR /&gt;select &lt;FIELDNAMES&gt; from &lt;TABLE name=""&gt;;&lt;BR /&gt; spool off&lt;BR /&gt;&lt;BR /&gt;you could also properly format the output by setting format parameters in sqlplus or inside the select statement.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Blade&lt;/TABLE&gt;&lt;/FIELDNAMES&gt;</description>
      <pubDate>Wed, 12 Mar 2003 08:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924893#M817788</guid>
      <dc:creator>BLADE_1</dc:creator>
      <dc:date>2003-03-12T08:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924894#M817789</link>
      <description>spool file-name.csv&lt;BR /&gt;set termout off&lt;BR /&gt;set pagesize 0&lt;BR /&gt;set heading off&lt;BR /&gt;set feedback off&lt;BR /&gt;//your select statements here on the table//&lt;BR /&gt;spool off&lt;BR /&gt;&lt;BR /&gt;you can open the .csv file in excel.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Revert on further help&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 09:19:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924894#M817789</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-03-12T09:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924895#M817790</link>
      <description>Also check this attachment</description>
      <pubDate>Wed, 12 Mar 2003 09:31:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924895#M817790</guid>
      <dc:creator>T G Manikandan</dc:creator>
      <dc:date>2003-03-12T09:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924896#M817791</link>
      <description>&lt;BR /&gt;You can import the data into MS EXCEL using ODBC..&lt;BR /&gt;&lt;BR /&gt;Configure odbc for oracle specifying the userid and service name(connect string) and then open MS Excel and go to DATA menu--&amp;gt; import data--&amp;gt; new database query and then enter the options u require i.e table, system table for a particular user and the columns u require to be included in the query...&lt;BR /&gt;&lt;BR /&gt;This works fine..have tried it on OFFICE XP...&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Blade..&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2003 10:59:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924896#M817791</guid>
      <dc:creator>BLADE_1</dc:creator>
      <dc:date>2003-03-12T10:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924897#M817792</link>
      <description>John is correct in how to unload that data from the system.  The best way to do it would be something like the following:&lt;BR /&gt;&lt;BR /&gt;sqlplus user/pass &amp;lt;&amp;gt; /dev/null&lt;BR /&gt;set head off&lt;BR /&gt;set feed off&lt;BR /&gt;set linesize 500&lt;BR /&gt;set pagesize 10000&lt;BR /&gt;spool filedata.lst&lt;BR /&gt;select fielda||','||fieldb||','||fieldc from tableA&lt;BR /&gt;spool off;&lt;BR /&gt;exit;&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt;You might have to remove the sqlstatement automaticlly placed at the top, but this should output in CSV.  &lt;BR /&gt;&lt;BR /&gt;brian</description>
      <pubDate>Wed, 12 Mar 2003 21:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924897#M817792</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-03-12T21:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924898#M817793</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Apart from what others have suggested...&lt;BR /&gt;&lt;BR /&gt;free version of TOAD has a built-in utility of extracting data in csv format. you might want to look at that if you want to extract more and more tables.&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Stan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Mar 2003 00:51:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924898#M817793</guid>
      <dc:creator>Stan_17</dc:creator>
      <dc:date>2003-03-13T00:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924899#M817794</link>
      <description>hello,&lt;BR /&gt;&lt;BR /&gt;I'm going to suggest UTL_FILE for this task since:&lt;BR /&gt;&lt;BR /&gt;- you have great control over the output file format and you seem to need that here.&lt;BR /&gt;- you can easily use dbms_job to schedule this procedure to run automatically every day at a certain time.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is a working example.  I dump dates in a non-standard format (but one that saves all of the fields).  you can modify as you wish.&lt;BR /&gt;&lt;BR /&gt;yd@yddb.ora8i.mu&amp;gt; create or replace procedure dump_table_to_csv( p_tname in varchar2,&lt;BR /&gt;  2                                                 p_dir   in varchar2,&lt;BR /&gt;  3                                                 p_filename in varchar2 )&lt;BR /&gt;  4  is&lt;BR /&gt;  5      l_output        utl_file.file_type;&lt;BR /&gt;  6      l_theCursor     integer default dbms_sql.open_cursor;&lt;BR /&gt;  7      l_columnValue   varchar2(4000);&lt;BR /&gt;  8      l_status        integer;&lt;BR /&gt;  9      l_query         varchar2(1000)&lt;BR /&gt; 10                      default 'select * from ' || p_tname;&lt;BR /&gt; 11      l_colCnt        number := 0;&lt;BR /&gt; 12      l_separator     varchar2(1);&lt;BR /&gt; 13      l_descTbl       dbms_sql.desc_tab;&lt;BR /&gt; 14  begin&lt;BR /&gt; 15      l_output := utl_file.fopen( p_dir, p_filename, 'w' );&lt;BR /&gt; 16      execute immediate 'alter session set nls_date_format=''dd-mon-yyyy hh24:mi:ss'' ';&lt;BR /&gt; 17  &lt;BR /&gt; 18      dbms_sql.parse(  l_theCursor,  l_query, dbms_sql.native );&lt;BR /&gt; 19      dbms_sql.describe_columns( l_theCursor, l_colCnt, l_descTbl );&lt;BR /&gt; 20  &lt;BR /&gt; 21      for i in 1 .. l_colCnt loop&lt;BR /&gt; 22          utl_file.put( l_output, l_separator || '"' || l_descTbl(i).col_name || '"' );&lt;BR /&gt; 23          dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );&lt;BR /&gt; 24          l_separator := ',';&lt;BR /&gt; 25      end loop;&lt;BR /&gt; 26      utl_file.new_line( l_output );&lt;BR /&gt; 27  &lt;BR /&gt; 28      l_status := dbms_sql.execute(l_theCursor);&lt;BR /&gt; 29  &lt;BR /&gt; 30      while ( dbms_sql.fetch_rows(l_theCursor) &amp;gt; 0 ) loop&lt;BR /&gt; 31          l_separator := '';&lt;BR /&gt; 32          for i in 1 .. l_colCnt loop&lt;BR /&gt; 33              dbms_sql.column_value( l_theCursor, i, l_columnValue );&lt;BR /&gt; 34              utl_file.put( l_output, l_separator || l_columnValue );&lt;BR /&gt; 35              l_separator := ',';&lt;BR /&gt; 36          end loop;&lt;BR /&gt; 37          utl_file.new_line( l_output );&lt;BR /&gt; 38      end loop;&lt;BR /&gt; 39      dbms_sql.close_cursor(l_theCursor);&lt;BR /&gt; 40      utl_file.fclose( l_output );&lt;BR /&gt; 41  &lt;BR /&gt; 42      execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';&lt;BR /&gt; 43  exception&lt;BR /&gt; 44      when others then&lt;BR /&gt; 45          execute immediate 'alter session set nls_date_format=''dd-MON-yy''';&lt;BR /&gt; 46          raise;&lt;BR /&gt; 47  end;&lt;BR /&gt; 48  /&lt;BR /&gt;&lt;BR /&gt;Procedure created.&lt;BR /&gt;&lt;BR /&gt;yd@yddb.ora8i.mu&amp;gt; exec dump_table_to_csv( 'emp', '/tmp', 'tkyte.emp' );&lt;BR /&gt;&lt;BR /&gt;PL/SQL procedure successfully completed.&lt;BR /&gt;&lt;BR /&gt;yd@yddb.ora8i.mu&amp;gt; host cat /tmp/tkyte.emp&lt;BR /&gt;"EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO"&lt;BR /&gt;7369,SMITH,CLERK,7902,17-dec-1980 00:00:00,800,,20&lt;BR /&gt;7499,ALLEN,SALESMAN,7698,20-feb-1981 00:00:00,1600,300,30&lt;BR /&gt;7521,WARD,SALESMAN,7698,22-feb-1981 00:00:00,1250,500,30&lt;BR /&gt;7566,JONES,MANAGER,7839,02-apr-1981 00:00:00,2975,,20&lt;BR /&gt;7654,MARTIN,SALESMAN,7698,28-sep-1981 00:00:00,1250,1400,30&lt;BR /&gt;7698,BLAKE,MANAGER,7839,01-may-1981 00:00:00,2850,,30&lt;BR /&gt;7782,CLARK,MANAGER,7839,09-jun-1981 00:00:00,2450,,10&lt;BR /&gt;7788,SCOTT,ANALYST,7566,09-dec-1982 00:00:00,3000,,20&lt;BR /&gt;7839,KING,PRESIDENT,,17-nov-1981 00:00:00,5000,,10&lt;BR /&gt;7844,TURNER,SALESMAN,7698,08-sep-1981 00:00:00,1500,0,30&lt;BR /&gt;7876,ADAMS,CLERK,7788,12-jan-1983 00:00:00,1100,,20&lt;BR /&gt;7900,JAMES,CLERK,7698,03-dec-1981 00:00:00,950,,30&lt;BR /&gt;7902,FORD,ANALYST,7566,03-dec-1981 00:00:00,3000,,20&lt;BR /&gt;7934,MILLER,CLERK,7782,23-jan-1982 00:00:00,1300,,10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;See the Supplied Packages guide for info on utl_file.  You must set some init.ora parameters to enable it to work correctly....&lt;BR /&gt;&lt;BR /&gt;This can be done via sqlplus as well -- just not as nicely in my opinion.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Thu, 13 Mar 2003 03:53:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924899#M817794</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-03-13T03:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924900#M817795</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;AS every one suggested, you can write the SQL to extract the data in the format you want and spool the out put to a file.&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;Download a free version of TOAD from &lt;A href="http://www.toadsoft.com" target="_blank"&gt;http://www.toadsoft.com&lt;/A&gt; and the executable is just 3.5MB. Once you downloaded all you need to access the database is an entry in the tnsnames.ora in ORACLE_HOME directory on your PC and connect tot he database. The export function in TOAD has a facility to save the exported data of the table in various formats (excel, txt, dmp...)files. So if your table is large, TOAD will be the best option for you.</description>
      <pubDate>Thu, 13 Mar 2003 04:53:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924900#M817795</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2003-03-13T04:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924901#M817796</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;i can think of two ways. The first is like others stated a SQL querry. You could set the Colum serperator to ";" like this:&lt;BR /&gt;&lt;BR /&gt;spool &lt;YOUR csv="" file=""&gt;&lt;BR /&gt;set head off &lt;BR /&gt;set feed off &lt;BR /&gt;set linesize 500 &lt;BR /&gt;set pagesize 10000 &lt;BR /&gt;set COLSEP ';'&lt;BR /&gt;select ......&lt;BR /&gt;spool off&lt;BR /&gt;&lt;BR /&gt;Something like this should work. Also you could have a look at Reports6i which is a free Report genereator vor Oracle 8i and up. (But its a ~260MB download)&lt;BR /&gt;&lt;BR /&gt;I havn??t had a deep look into it but i assume it can output its reports in a ascii/csv file.&lt;BR /&gt;&lt;BR /&gt;But keep in mind that Excel is not reconmendet for really large tables. AFAIK there is a limitation to max. 64000 lines per table.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Regards Stefan&lt;/YOUR&gt;</description>
      <pubDate>Thu, 13 Mar 2003 07:33:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924901#M817796</guid>
      <dc:creator>Stefan Schulz</dc:creator>
      <dc:date>2003-03-13T07:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to export Oracle Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924902#M817797</link>
      <description>Hi &lt;BR /&gt;I suppose you can refer to my answer in another thread.&lt;BR /&gt;&lt;BR /&gt;the script is to generate the conttrol file and the SQL to generate the data file to be uploaded to an Oracle table with SQLloader.&lt;BR /&gt;&lt;BR /&gt;I think you can use the mecanism if you want to upload the data into a spreadsheet or MS Access, I suppose you have a very good reason to do so.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jean-Luc&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd4e2a848deccd61190050090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd4e2a848deccd61190050090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Mar 2003 08:46:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-export-oracle-data/m-p/2924902#M817797</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2003-03-13T08:46:29Z</dc:date>
    </item>
  </channel>
</rss>

