Connecting Tech Pros Worldwide Forums | Help | Site Map

need output without using dbms_output package

Newbie
 
Join Date: Sep 2008
Posts: 1
#1: Sep 23 '08
1 declare 2x1 number;
3 begin 4x1 :=5;
5 declare 6x2 number ;
7 begin 8x2 :=6;
9 x1:=x2 ;
10 end;
11 x2 := X1 ;
12 * end;
13 / x2 :=X1;
*error at line 11:ORA-06550 :line 11,column 1:PLS-00201: identifier 'X2' must be declared ORA-06550:line 11,column1: PL/SQL:statement ignored while executing the above nested block, getting the error as"identifier 'X2' must be declared".without declaring the variables inside the block how can u use the variable.Also i want to view the output of that variable without using DBMS_OUTPUT package.

Familiar Sight
 
Join Date: Feb 2007
Location: Calgary AB Canada
Posts: 153
#2: Sep 25 '08

re: need output without using dbms_output package


this is hard to reply to. You need to grab a book and get some of the fundamental PL/SQL syntax learned. variables need to be declared and if the scope of a variable is beyond the inner block then declare it in the outer block.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#3: Sep 25 '08

re: need output without using dbms_output package


if you do not want to use DBMS_OUTPUT , you need to define your own procedure for that purpose.
Reply