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 -> Rowtype Variable Assignment?

Rowtype Variable Assignment?

From: <shirushah_at_hotmail.com>
Date: Sun, 22 Nov 1998 20:23:29 GMT
Message-ID: <739rrl$aqg$1@nnrp1.dejanews.com>


I want to assign a variable of type rowtype. It assigns the columns of dept containing dname varchar2(10)
loc varchar2(10)

I only want the loc cloumn's data back assigned back into li_deptloc the host variable. This is what I am doing, which does not work. HELP please.

sql> variable li_deptloc varchar2(15) -- declare host variable sql> declare lr_deptall dept%rowtype; -- declare variable begin select * into :lr_deptall --assign all values of dept into variable from dept where deptno = 40; li_deptname := lr_deptall.loc -- get loc value and assign to host variable end; sql> print li_deptname&#137;

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sun Nov 22 1998 - 14:23:29 CST

Original text of this message

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