Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Selecting a variable similar to a column

Selecting a variable similar to a column

From: Rick Stephenson <rstephenson_at_ovid.com>
Date: Wed, 10 Apr 2002 13:03:23 -0800
Message-ID: <F001.004410A3.20020410130323@fatcity.com>


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  

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Rick Stephenson
  INET: rstephenson_at_ovid.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Apr 10 2002 - 16:03:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US