Writing lines > 32k

From: ExecMan <artmerar_at_yahoo.com>
Date: Mon, 9 Apr 2012 13:12:34 -0700 (PDT)
Message-ID: <cde80659-10dc-4bd4-a011-93e80b5a9740_at_a8g2000pbe.googlegroups.com>



Hi,

I have a query which constructs a line that is > 32k. I need to write that out to a file. Oracle does not seem to like what I'm doing here. Does anyone have a good solution to solve the 32k issue?

Thanks!

DECLARE
CURSOR data_crs IS
  SELECT
    os.signature_name||'|'||os.signature_date||'|'|| TO_CHAR(os.date_of_last_update,'MM/DD/YYYY')||'|'||

    f4.sequence||'|'||f4.url||'|'||f4.security_title||'|'|| TO_CHAR(f4.transaction_date,'MM/DD/YYYY')||'|'||

    f4.deemed_execution_date||'|'||f4.transaction_form_type||'|'|| f4.transaction_code||'|'||

    f4.equity_swap_involved||'|'||f4.transaction_timeliness||'|'|| f4.transaction_shares||'|'||

    f4.transaction_price_per_share||'|'||
f4.trans_acquired_disposed_code||'|'||
f4.shares_owned_after_transaction||'|'||

    f4.direct_or_indirect_ownership||'|'||f4.nature_of_ownership||'|'|| TO_CHAR(f4.date_of_last_update,'MM/DD/YYYY')||'|'||

    fn.xml_location||'|'||fn.footnote_id||'|'|| fn.footnote_id_description||'|'||TO_CHAR(fn.date_of_last_update,'MM/DD/ YYYY') line
  FROM footnotes fn, owner_signature os, non_derivative_form_4 f4

  WHERE f4.transaction_code = 'P'
    AND fn.url = os.url
    AND fn.url = f4.url
    AND f4.date_of_last_update > ADD_MONTHS(SYSDATE,-6);

v_file_id UTL_FILE.FILE_TYPE;

BEGIN
  v_file_id := OPEN_FILES('/tmp','insider.csv','w');   FOR v_rec IN data_crs LOOP
    UTL_FILE.PUT_LINE(v_file_id,v_rec.line);   END LOOP;
  UTL_FILE.FCLOSE_ALL;
END;
/ Received on Mon Apr 09 2012 - 15:12:34 CDT

Original text of this message