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: Jan Pruner <jan_at_pruner.cz>
Date: Tue, 26 Mar 2002 11:58:52 -0800
Message-ID: <F001.00433F5C.20020326115852@fatcity.com>


Yes, I know it's 32767.
My code:
PROCEDURE ...
sqlstr VARCHAR2(4000);
....
sqlstr := my_pack.GETSQL( sql_id ... ); -- function

OPEN my_cursor FOR sqlstr;
...
END; If the length of sqlstr is > 4000,
 I get an exception and the error is: sqlstr _IS_NULL_ Why?
I'm using 8.1.7.0.3 on Linux.

JP

On Tue 26. March 2002 20:24, you wrote:
> 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: Jan Pruner
  INET: jan_at_pruner.cz

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:58:52 CST

Original text of this message

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