Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools

Topic: SQL*Plus and PL/SQL >> SP2-0552: Bind variable not declared

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.


 Title: SP2-0552: Bind variable not declared
 jass  Posted: Jan 01, 2009 02:25:06 AM

 Total Post: 41
 Joined: Nov, 2008

 whenever i run following code,error arise as shown below:
variable v_d number(3)
dep number(3);
select max(deptno) into dep from dept;
print v_d;
SP2-0552: Bind variable "V_D" not declared.

Posted: Jan 01, 2009 03:08:03 AM  

 Total Post: 319
 Joined: Jul, 2008

With Bind variables:-

SQL> variable v_d number
SQL> declare
2 dep number(3);
3 begin
4 select max(deptno) into dep from dept;
5 :v_d:=dep;
6 end;
7 /

PL/SQL procedure successfully completed.

SQL> print v_d

Without Bind variables:-

SQL> declare
2 dep number(3);
3 begin
4 select max(deptno) into dep from dept;
5 dbms_output.put_line(dep);
6 end;
7 /
PL/SQL procedure successfully completed.

Posted: Jan 01, 2009 03:33:47 AM  

 Total Post: 319
 Joined: Jul, 2008

Bind variables:-

 Time Zone: EDT


Forum Rules & Description

Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user


Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  menon srivalsala kumar639
  positive fanatic615
  Gitesh Trivedi580
  Jayanta Sur480
  Vinoth Kumar436
  Vishant Sanghavi414
  Vigyan Kaushik403
  Gopu Gopi367

oracle Mag

  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor