Showing results for 
Search instead for 
Did you mean: 

SP2-0552 error in oracle 8.1.7

Go to solution

SP2-0552 error in oracle 8.1.7

hello at all,
After having to create a named table my_dual, with the following order:
create table my_dual (dummy varchar2(1) primary key) organization index;
insert into my_dual been worth (' X'); by wanting to execute the order below:
select sys_context(:b2,:b1) from my_dual;
i received the follow error :
SP2-0552: Variable de lien "B1" non dà clarà e.
how i can to resolve it ?
thank for your assistan
Graham Cameron_1
Honored Contributor

Re: SP2-0552 error in oracle 8.1.7

You need to declare 2 pl/sql variables before you nca pass them to a function, and what you put into them depends what you are trying to pass into sys_context.

You need a pl/sql block. Create a file containing the following, and run from sqlplus:
set serveroutput on size 1000000
b1 varchar2(32) := 'USERENV' ;
b2 varchar2(32) := 'DB_NAME' ;
c1 varchar2(64) ;
select sys_context (b1, b2)
into c1
from dual ;
dbms_output.put_line(c1) ;
end ;
Hopefully that shows the principle of operation.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Sanjay Kumar Suri
Honored Contributor

Re: SP2-0552 error in oracle 8.1.7

Can also refer the following site for more details on bind variables.

A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Honored Contributor

Re: SP2-0552 error in oracle 8.1.7


you should define the bind variables (variable de lien) first using:

variable b1 varchar2(10);
variable b2 varchar2(10);

before doing:
select sys_context(:b2,:b1) from my_dual;

hope this helps!

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)