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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Dynamic SQL

Re: Dynamic SQL

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 26 Mar 2002 11:24:31 -0800
Message-ID: <F001.00433CFB.20020326112431@fatcity.com>

Depends how you are getting that 4,000 characters to the procedure, of course, but a pl/sql varchar2() can in principle be 32,000 bytes.

And if that isn't enough, you may have to fall back to dbms_sql which exposes a packaged type which is an array of varchar2(255) so that you can build, pass, and execute the array. (I think there's a sample of this on my web site).

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar - UK, April 3rd - 5th
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases

-----Original Message-----
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Date: 26 March 2002 18:58

|Hello
|I'm using variable sqlstr VARCHAR2(4000) in procedure to create
SELECT string.
|But the length of my SELECT * FROM .... is bigger than 4000 chars.
|
|Is there a way how to call OPEN my_cursor FOR sqlstr;
|for sqlstr longer than 4000 signs?
|
|JP

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jonathan Lewis
  INET: jonathan_at_jlcomp.demon.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Mar 26 2002 - 13:24:31 CST

Original text of this message

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