multiple inline view in pl/sql? [message #36342] |
Sun, 18 November 2001 23:10 |
hanhonghee
Messages: 1 Registered: November 2001
|
Junior Member |
|
|
is it possible to use multiple inline view in pl/sql
like this?
CREATE OR REPLACE procedure aaa
is
a char(8);
b char(8);
begin
select to_char(sysdate,'yyyymmdd'),
(select to_char(sysdate,'yyyymmdd') from dual)
into a,b
from dual;
end;
/
the sql state is valid... in sqlplus
but error occurs when I compile it
this code doesn't created with this error message
"PLS-00103.... ( - +
mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql std"
please tell how to use inline view in pl/sql block....
not in from clause. in field....
----------------------------------------------------------------------
|
|
|
Re: multiple inline view in pl/sql? [message #36352 is a reply to message #36342] |
Mon, 19 November 2001 11:06 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
you need to re-structure the statement and alias
the second date.
CREATE OR REPLACE procedure aaa
is
a char(8);
b char(8);
begin
select to_char(sysdate,'yyyymmdd'), x.date2
into a,b
from dual, (select to_char(sysdate,'yyyymmdd') date2 from dual) x;
end;
----------------------------------------------------------------------
|
|
|