Reg: Spool data CSV-

Hi Experts,

I'm pulling in a CSV file using the < tt > < /tt > SPOOL data in table a prod.
But the file is too large. The table has ~ 49K records and currently 35K have been inserted... the size of the file is 190MO now and still growing.

When I open the CSV file, I checked after the last column of the next cell is not immediately after that. There is a long interval.
It seems that the query could not generate the CSV file.

I do something like below.
set colsep ','
set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on linesize 10000 
spool c:\rb2\testing.csv

SELECT 
    x.col1||','||
    x.col2||','||
    x.col3||','||
    x.col4||','||
    x.col5
FROM 
    test_table x;
    
spool off;
No idea why the size becomes so huge and how can it be avoided?
Thank you!

-Nordine

This is because you have set your LINESIZE as 10000.

I would use DUMP_CSV. I installed in production. It is always useful.

http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:68212348056

Tags: Database

Similar Questions

  • Downsampling (decimate) data csv huge

    Hi all

    I'm trying to re - sample (decimate) the csv data attached, fortunately we can I build a decimator to take values in the CSV (entrance) each number of lines and transfer them to a new file excel (output). Any suggestions?

    Thank you.

    If you have your open data in Excel, you can choose to save as tab Delimited Text "' this will allow you to interact directly with playback of worksheet VI illustrated here:

    Reading of all data lines used to handle data to extract individual columns using the table features in LabVIEW. I recommend you to read the help of LabVIEW for instruction on the i/o file, in addition to the manipulation of the table.

    See you soon,.

  • Spool file CSV/Excel/text using ODI

    Hi all

    I'm working on the ODI 11 g.

    We have a few packages of reports that we intend to implement in order to provide charges for numbers of campaign as follows:


    Number of campaign



    Name of the campaign



    Name of the product



    Start date



    End date



    Total leads of CCC



    Sales



    %Sales/RPC



    CPP



    DNC



    LON4T





















    IND01




















    So, basically, we need to be rolled up an excel file or csv file or a text file by running a daily procedure oracle data integrator. We are working on the request, but need to understand how an exportable excel file
    using ODI.

    Can you please provide me with an idea to see how an ODI package be used to generate an excel file with above mentioned column values?

    Thank you

    Hi lony ,.

    There is this blog post from Julien Testut-Oracle : https://blogs.oracle.com/dataintegration/entry/using_microsoft_excel_as_a_sou

    It is 10g but still applicable in 11g.

    You can also take a look at this driver JDBC of ODIexperts.com: ODI_JDBC_EXCEL - ODIExperts.com

    Kind regards

    JeromeFr

  • Fusion of data CSV file does not open

    Hello

    Problems of selection/update CSV files to merge data.

    This is a file that I worked for a while now with no probs in CS6.

    But it doesn't in CC.

    Get the following error "the data source selected has one or more empty field names.

    I tried zapping all data and data of collage in the new file, filling all the empty cells with data (although it worked fine before), also tried a TXT file. All this without success.

    A new CSV with little or no data in it works very well. But that is not very useful.

    Any thoughts?

    See you soon,.

    N *.

    The problem seems to be with the title of the column #

    I changed it to digitaland the new csv imported without problems or warnings.

  • Load data CSV with Dates

    Hi all

    I have a CSV file and try to load it in an existing table and manage loading dates into the date columns. It has dates in the format like (2010-12-31 00:00:00) and Apex data loading will not accept them. It seems not to accept that something like: December 31, 2010 00:00:00.

    I can't reformat the CSV file as there are has 42 000 lines of data. Is it possible to make this work? I see a format column in the load screen data, but have found no info on what it is or how to use it.
    Any help would be greatly appreciated!

    TIA
    Mark

    Mark,
    Try to use a statement of formatting as DD/MONTH/YYYY hh24:mi:ss import...

    Thank you

    Tony Miller
    Webster, TX

  • Reg: Export data of the physical database system standby.

    Hi all

    We have a standard edition one 11 GR 1 material oracle environment, I need to export the data from the physical monitoring system.

    If anyone can suggest me, how to do it safely (up state).

    Kind regards

    Konda.

    Oracle Data Guard is available only as a feature of Oracle Database Enterprise Edition. It is not available with Oracle database Standard edition.

    Then you must export data only from primary or you use EXP instead of EXPDP on the standby database. Because EXPDP create a temporary table export process duration.

    Concerning

    Mr. Mahir Quluzade

  • Could not retrieve data CSV.

    Jin
    I use OIM 9.1.0.1 and I tried to configure a user for the database using GTC and succeeded, I tried to create the GTC for the CSV to use as the source of confidence for reconciliation and succeeded but now when I try to Import CSV user to the database I'm no longer able to do and the regular taks indicates an error. I'm just stuck as I don't know what went wrong!

    Please help me...

    pre-fill adapter to generate a value for the mail attribute

    http://download.Oracle.com/docs/CD/E10391_01/doc.910/e10366/using.htm#sthref81

    Thank you
    Suren

  • Reg: Export data in excellent in 11g ADF application.

    Hi all

    We have developed an ADF 11 g application that retrieves the data from database in table form. Now, we have an obligation to export the data in an excel sheet.

    Can someone help us please in this regard.

    Thank you
    Harsha

    Hi Harsha,

    You can use component to do so. Set the exportedId property to point to the table. You have options to export all the rows or only selected lines.

    
    
    
    
    
    
    

    Good luck

    Luc Bors

  • Reg: BLOB Data Type

    Hi all

    I use Oracle 10.2.

    I had a table contains one column. data type is BLOB.

    When I run the select query I get error like:

    SQL > select * from BRIEF_ALL;
    SP2-0678: column Type or attribute can not be displayed by SQL * more
    SQL > desc BRIEF_ALL;
    Name                                      Null?    Type
    ----------------------------------------- -------- ----------------------------
    CONTENT                                            BLOB

    Thank you

    SP2-0678: column Type or attribute can not be displayed by SQL * more

    Upgrade of SQL * Plus 11.1.0.7:

    SQL> create table t (bl) as select to_blob(utl_raw.cast_to_raw('Hello world')) from dual
      2  /
    
    Table created.
    
    SQL>
    SQL> desc t
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     BL                                                 BLOB
    
    SQL> select * from t
      2  /
    
    BL
    --------------------------------------------------------------------------------
    48656C6C6F20776F726C64
    
    SQL>
    

    For older versions, you can try

     select utl_raw.cast_to_varchar2(bl) bl from t
    
  • Reg: XmlType data type.

    Hi friends

    I'm passing XML script in procedure parameter.
    as below.

    It is the xml script.

    ' <? XML version = "1.0"? > < TXLife xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" > < UserAuthRequest xmlns = "http://ACORD.org/Standards/Life/2" > < UserSessionKey > 100 < / UserSessionKey > < VendorApp > < VendorName VendorCode = "989" > Servion < / SupplierName > < AppName > IVR < / AppName > < / VendorApp > < / UserAuthRequest > < / TXLife > '

    PROC1 (p_type XmlType);

    When performing this procedure I get the error message like "wrong number or types of arguments.

    Help.
    SQL> CREATE OR REPLACE PROCEDURE dummy_xml (p_xml XMLTYPE) IS
      2  BEGIN
      3   null;
      4  END;
      5  /
    
    Procedure created.
    
    SQL> EXECUTE dummy_xml(' 100  ServionIVR ');
    BEGIN dummy_xml(' 100  ServionIVR '); END;
    
          *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'DUMMY_XML'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    
    SQL> EXECUTE dummy_xml(XMLTYPE(' 100  ServionIVR '));
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • Access a table on Oracle 8 worm in Oracle 10 g

    Hi all

    Could you please tell me how to access a table sitting directly on the version of Oracle 8.1.6 database in Oracle 10 G database. Enjoy your time.

    Thank you and best regards,
    Ariean.

    Hello

    If you runninng on a client computer, then you can use sql script to extract and use sqlldr to load from it. But if you want to extract using the pl/sql procedure (utl_file) then you must write a procedure that generates the CSV on server 8i db, then you ftp put .csv in shape and use sqlldr. Utl_file in 8i implementation is easy, but it might require a reboot. But in this case, write a small sql script to generate the file (spool) data (csv) and loaded into 10g using sqlldr. Here a little script to genereate a sql script that generates in turn "|" delimited datafile.

    Just replace "MY_OBJECTS" with your table name and it will generate the sql script that you can run client to generate .csv ("" | "") bounded. You can change to generate «,»

    {code}

    SET pagesize 0
    SET verify off
    SET feedback off
    SET linesize 400
    SET Termout off
    TRIMSPOOL on SET
    SET TRIMOUT ON

    COIL mytest.sql

    SELECT 'spool test.csv' FROM DUAL;
    SELECT DISTINCT
    «set termout off»
    || CHR (10)
    || 'set feedback off.
    || CHR (10)
    || 'set on '.
    || CHR (10)
    || ' set pagesize 0'
    || CHR (10)
    || 'set linesize 800'
    || CHR (10)
    || "set TRIMOUT on.
    || CHR (10)
    || "set trimspool on."
    || CHR (10)
    || "long set of 2000'.
    Of user_tab_columns
    WHERE table_name = UPPER ('MY_OBJECTS');

    SELECT "select".
    FROM DUAL;

    SELECT (CASE
    WHEN column_id = 1
    THEN
    (CASE
    WHEN data_type LIKE '% CHAR % '.
    THEN
    column_name
    WHEN data_type = "DATE".
    THEN
    «to_char (' |)» column_name | ('' DD-MON-YYYY») "
    ON THE OTHER
    column_name
    END)
    ON THE OTHER
    (CASE
    WHEN data_type LIKE '% CHAR %' AND data_length = 4000
    THEN
    '||''|''|| substr ("|") column_name | 1.4000)"
    WHEN data_type LIKE '% CHAR % '.
    THEN
    '||''|''||' || column_name
    WHEN data_type = "DATE".
    THEN
    '||''|''|| TO_CHAR (')
    || column_name
    || '|'' DD-MON-YYYY ")'
    ON THE OTHER
    '||''|''||' || column_name
    END)
    END)
    Of user_tab_columns
    WHERE table_name = UPPER ("MY_OBJECTS")
    ORDER BY column_id;

    SELECT «|» DELIM "'
    FROM DUAL;

    SELECT "from MY_OBJECTS;"
    FROM DUAL;

    SELECT "off spool.
    FROM DUAL;

    {code}

    Concerning

    Published by: OrionNet on March 18, 2009 10:15

  • How to export data from a string to a CSV file

    Hello

    I have a string in a script object Livecycle Designer with a couple of lines with different inputs divided by a semicolon:

    COLUMN1;COLUMN2;COLUMN3
    Entry1;Entry2;Entry3
    Entry4;Entry5;Entry6
    

    The goal now is to export this channel of Livecycle Designer in a CSV file, by clicking a button. Is there a suggested solution?

    Thank you very much.

    Hello

    You can try to create a dataObject object and then export, you can get some warning messages popup but try this;

    var csvData. = "COLUMN1; COLUMN2; COLUMN3\r\n ';

    csvData += 'Entry1; Entry2; Entry3\r\n ';

    csvData += "Entry4; Entry5; Entry6\r\n ';

    var PDF = event.target;

    pdf.createDataObject ("Data.csv", csvData);

    pdf.exportDataObject ({cName: "Data.csv"});

    If you replace the last line with

    pdf.exportDataObject ({cName: "Data.csv", nLaunch: 2});

    It will be opened in a .csv is approved (Excel on my system)

    Concerning

    Bruce

  • Data queue on the remote server to Local computer

    Hi Experts,

    Please help, I need data spool on a remote server using putty (sqlplus) to a local computer. There are credentials that I give before accessing remote databases and I am able to do... I tired with the sub query but the spool file (csv or txt) is not able to create on the local computer.

    set colsep,
    set pagesize 120
    Set trimspool on
    headsep off Set
    set linesize 1000
    Set numw

    coil D:\test\myfile.csv

    Select table_name, tablespace_name of all_tables;

    spool off

    PS: I'm new to this technology, please help

    Kind regards
    Bosch

    Hello

    You will need SQL * more on the local computer instead of ssh on the server.
    The comand coil reels to the file system where SQL * more is running. If you first of PuTTY (ssh) on the server, then your SQL * more is running on the server, not on the local computer.

  • Format of the data "put on hold".

    Hi all

    I use utility "coil" in the scripts SQL Oracle to redirect the rows returned to a file. But I don't like how the rows are returned.

    For EXAMPLE, the 3 columns, lines have returned in following way:

    FIRST NAME
    --------------------------------------------------------------------------------
    MIDDLE_NAME
    --------------------------------------------------------------------------------
    LAST_NAME
    ------------
    PARAG
    ASHOK
    KARIMA

    Ideally, I would like to see the data in a format (perhaps CSV):
    FIRST_NAME, MIDDLE_NAME, LAST_NAME
    PARAG ASHOK, KARIMA

    So even if the header is not displayed and only the lines (but individual line) are returned for each SQL query in my SQL script, I'm ok with it. For example:
    PARAG ASHOK, KARIMA
    ABC, PQR, XYZ

    It is therefore possible control the format of the spooled data?

    Hello

    You can do some of these settings if

    set term off;      // Suppress the display so that you can spool output without seeing the output on the screen.
    set heading off;   // Turn off heading
    set linesize 400;  // Set the number of characters per line to 400.  Adjust this number to 0 or something for your real data.
    set feedback off;  // Turn off feedback
    spool emp.txt; // Spool the output to a file named outfile.txt
    select empno||','|| ename from emp;    // Select each column from table oracle_2_table, delimiting by a comma
    spool off;
    

    Twinkle

  • Export the library of books as a .csv file?

    I'm trying to compare my Calibre library with my library of books in iTunes 11.4. Caliber exports data .csv file, but I don't see how the same (or even a file of Excel data or numbers) to the ca. 950 books in my library of books to iTunes. I managed to 'print' a PDF (28 pages) of it, however.

    Is it possible to get a data file of the compatible spreadsheet of my books on iTunes?

    I never did anything with iBooks, but with iTunes you can actually highlight a series of lines, copy, and paste.

Maybe you are looking for