Re: PL/SQL problem? Line too long?

From: Jonathan W. Ingram <jingram_at_teleport.com>
Date: 1997/01/28
Message-ID: <5ck7u3$arj$1_at_nadine.teleport.com>#1/1


On Mon, 27 Jan 1997 15:02:09 +0100, Simon Mercer <mercer_at_rzpd.de> wrote:

>I have a number of PL/SQL procedures which insert data into tables,
>doing some 'housekeeping' along the way. This works fine, all you need
>to do for an insert, for example, is call the procedure like this;
 

>exec insert_test('field1','field2','field3');
 

>But now I have encountered the problem that there appears to be a
>maximum length for the line, and I have not found a way around this.
>PL/SQL interprets returns as the end of the command, and backslashes
>have no effect.
 

>Is there any way to extend this line, ideally to thousands of
>characters? (the limit now seems to be 255).
 

>Many thanks for your answers,

As a start, you might try using multiple lines in your statement. SQL*Plus doesn't accept a command unless you conclude it with a semicolon or run it with a slash. PL/SQL blocks don't execute until commanded to run with a /.

exec insert_test ('field1',

                          'field2',
                           field3');

or

exec insert_test ('field1', 'field2',
'field3')

or just about any other variation of this.

If an individual field is over 255 characters, you might create a long variable inside your PL/SQL block and pass that variable to a column of type long. Varchar2 might also do the trick, depending on the length of your field.

I am only guessing that you are running from inside SQL plus (the exec kind of hints at that).

I hope this was some help.

Jonathan Ingram
Meridian Technology Group
503.639.0816 Received on Tue Jan 28 1997 - 00:00:00 CET

Original text of this message