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

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL Variable Question

PL/SQL Variable Question

From: <shirushah_at_hotmail.com>
Date: Sun, 22 Nov 1998 02:35:02 GMT
Message-ID: <737t8m$rfu$1@nnrp1.dejanews.com>


How do you assign, from the row of data that you have selected with a rowtype variable, just the data from one column into a variable? Here is an example

SQL> variable li_deptname varchar2(20); SQL> declare

    	li_dept      dept%rowtype;
   	begin
           		select * into li_dept
           		from dept
           		where deptno = 40;
  	 end;

In the dept table exsits a loc column, how do I get only data from that one column and assign it to the host variable li_deptname?

Thanks in advance

SS
&#137;

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Nov 21 1998 - 20:35:02 CST

Original text of this message

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