| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> H/T put value of lexical reference into bind variable?
Hi:
I want to put the value of a lexical reference (substitution variable) into a bind variable so I can pass/use it to/in a function.
I'm using Report Builder 3.0.5.13.0, PL/SQL Release 2.3.4.5.0 Production.
I've seen an example like this:
..
hold number := '&F_1';
begin
if hold = 1 then
srw.message(100, 'works: ' || hold);
return (hold);
else
srw.message(200, );
return (0);
end if;
end;
But this gives me a numeric error ('&F_1' value should be a number), the value of 'hold' is '&F_1' apparently instead of the value of '&F_1'.
..
hold varchar2(10) := '&F_1';
begin
if hold = '1' then
srw.message(100, 'works: ' || hold);
return (hold);
else
srw.message(200, 'bad karma: ' || hold);
return (0);
end if;
end;
Once again the value of 'hold' is '&F_1' and not the value of '&F_1'.
I know lexical references can't be used in pl/sql blocks, but there has to be a way to get the value for use inside a block.
Any information would help. Thanks.
Terry Barhorst
terry.barhorst_at_rrc.state.tx.us
Received on Tue Dec 28 1999 - 16:42:01 CST
![]() |
![]() |