Home » SQL & PL/SQL » SQL & PL/SQL » bind variable GENCR not declared
bind variable GENCR not declared [message #1673] Tue, 21 May 2002 13:53 Go to next message
CHRISTA S. WILLIAMS
Messages: 3
Registered: February 2002
Junior Member
I am getting this error when I run a statement given to me by a sysadmin from another company. I don't know Oracle/SQL very well so can you tell me what is wrong to produce this message? '
Bind variable "GENCR" not declared.'

thanks, Christa
Re: bind variable GENCR not declared [message #1676 is a reply to message #1673] Tue, 21 May 2002 21:36 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
It means exactly what it says: there's no bind variable known in your environment with the name GENCR. Look at the following example:
If I issue the following anonymous PL/SQL-block I'll get the same message:

SQL> begin
2 select *
3 into :x
4 from dual;
5 end;
6 /
Bind variable "X" not declared.
SQL>

If I declare x however:
SQL> var x char
SQL> /

PL/SQL procedure successfully completed.

SQL> select :x from dual;

:X
--------------------------------
X

SQL>

====

More info is available at OTN:
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a82950/ch3.htm#1002255

HTH,
MHE
bind variable COUNT not declared [message #2933 is a reply to message #1676] Thu, 22 August 2002 14:13 Go to previous message
Jason Peterson
Messages: 3
Registered: August 2002
Junior Member
I'm having quite a time with this code. I know it's simple but I can't figure out what I'm missing. Here is my code.

DECLARE
v_id VARCHAR2(10) := 'JJOHNSON';
v_passwd VARCHAR2(10) := 'nopassword';
v_oid VARCHAR2(5) := 'TEC01';
v_fname VARCHAR2(20) := 'Jack';
v_lname VARCHAR2(20) := 'Johnson';
v_authlevel NUMBER := '1';
var count CHAR;
BEGIN
UPDATE webusers
SET userid = v_id, password = v_passwd
WHERE first = v_fname
AND last = v_lname;

IF SQL%NOTFOUND THEN
INSERT INTO webusers ( userid, password, o_id, first, last, authlevel )
VALUES ( v_id, v_passwd, v_oid, v_fname, v_lname, v_authlevel );
ELSE
SELECT count(*) INTO :count FROM webusers;
END IF;

END;
/

When I runt the procedure, I get the following error:
SP2-0552: Bind variable "COUNT" not declared.
Previous Topic: Difference in columns
Next Topic: Bind variable "COUNT" not declared.
Goto Forum:
  


Current Time: Thu Apr 25 09:52:40 CDT 2024