I am using Oracle EE 8.1.7

 

Is there a way to select a variable similar to selecting a normal column of a table?  Or do I have to user dbms_output.put_line….

 

For example, can this:

 

declare

   lv_FirstName varchar2(20);

   lv_LastName varchar2(20);

begin

   lv_FirstName := 'rick';

   lv_LastName := 'stephenson';

   dbms_output.put_line(lv_FirstName||' '||lv_LastName);

end;

/

 

 

be written something like this:

 

declare

   lv_FirstName varchar2(20);

   lv_LastName varchar2(20);

begin

   lv_FirstName := 'rick';

   lv_LastName := 'stephenson';

   select lv_FirstName, lv_LastName from dual;

end;

 

 

Maybe I am off my rocker, but I thought I would at least ask.

When I run this, it tells me that it is looking for an INTO variable.  I don’t want to put it into a variable, I want it to return as if it were a select statement.

 

 

Thanks for your help,

 

Rick Stephenson

 

Reply via email to