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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL in PL/SQL

Re: Dynamic SQL in PL/SQL

From: Steven Whatley <swhatley_at_blkbox.com>
Date: 4 May 1998 13:11:00 GMT
Message-ID: <6ikep4$pt9$1@news.blkbox.com>


Rudi Demeulenaere <rdm_at_mentor.spamnothanks.be> wrote:
: Christian Scholz wrote:
: > I have a problem with the DBMS_SQL Package in a PL/SQL Procedure.
: > I try to generate a INSERT INTO statement and execute it with dynamic
: > SQL.
: > This works fine with a short statement. When I try to parse a long
: > statement with DBMS_SQL.PARSE(... ); the Database throws an exeption.
: > The sql error is -936.
: > I tried to use an PL/SQL table as the parameter, too.
:
: I used to have this when my execute-string was simply too short e.g....
: ExecuteString varchar2(2000);

When doing Dynamic SQL, I always declare my SQL vars as:

        sql_cmd VARCHAR2(30000);

Yes, PL/SQL allows PL/SQL variables of type varchar2 to be 30,000 in length.

Hope this helps,
Steven

                 _|_  |  _|_   "I am the way and the truth and the life.
                  | --|-- |     No one comes to the Father except through
Steven Whatley    |   |   |      me.  If you really knew me, you would
Houston, Texas        |           know my Father as well.  From now on,
swhatley_at_blkbox.com   |            you do know him and have seen him."
http://www.blkbox.com/~swhatley/        -- Jesus Christ (John 14:6-7 NIV)
Received on Mon May 04 1998 - 08:11:00 CDT

Original text of this message

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