I have written a procedure which takes a delimited list of values as a
varchar2 datatype. Only problem is that apparenty the length of the
list exceeds that permitted by the varchar2 datatype - a measly 200
bytes according to the definition i am receiving. Surely this isn't
right, here is a copy of the procedure definition:
PROCEDURE modifydata (tableName IN VARCHAR2, updatetype IN VARCHAR2,
v_values IN VARCHAR, v_delimiter IN VARCHAR2, v_status OUT RC)
It is the v_values variable, how do i get the size of the variable
increased?
Cheers
Dan
SR
And a bodacious howdy-do to you.
> I have written a procedure which takes a delimited list of values as a
> varchar2 datatype.
No, you've written it to take a VARCHAR datatype if that which you've
posted is to be believed.
> Only problem is that apparenty the length of the
> list exceeds that permitted by the varchar2 datatype - a measly 200
> bytes according to the definition i am receiving.
The problem is, apparently, one of your reaching the maximum value for
a single line in SQL*Plus.
> Surely this isn't
> right, here is a copy of the procedure definition:
>
> PROCEDURE modifydata (tableName IN VARCHAR2, updatetype IN VARCHAR2,
> v_values IN VARCHAR, v_delimiter IN VARCHAR2, v_status OUT RC)
>
> It is the v_values variable, how do i get the size of the variable
> increased?
>
You don't, and there is absolutely no need to do so. The variable,
when properly declared, will accept strings up to and including the
maximum declarable length for a VARCHAR2. Try changing the errant
definition and calling the procedure with another PL/SQL block with a
variable declared as varchar2(4000) and sufficient text to exceed your
'200 byte' limit. You should find this 'limit' lifted.
> Cheers
>
> Dan
David Fitzjarrell
Thanks for that but the problem turned out to be nothing to do with my
code. I was using TOAD to debug the proc and it seems that varchar
parameters are restricted by the app to 200 characters, when i ran the
code through SQL*Plus or a small VB app i created for testing it worked
fine. Annoying thing is I tried using SQL Developer and that has the
same restriction!
Can you elaborate?
Herod
Dan