Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL in PL/SQL
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
![]() |
![]() |