Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Rowtype Variable Assignment?
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‰
-----------== 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
![]() |
![]() |