pl/sql로 작성을 했는데 에러가 발생하거든요..
pl이 아닌 sqlplus로 begin,end를 뺀
update문만 실행하면 잘 되는데 왜 ?
update구문을 pl/sql에서 실행하면 안될까요?
SQL> begin
2
3 update tloge_count c
4 set logcnt = logcnt+nvl((SELECT sum(cnt)
5 from tloge t
6 where
7 t.userid = c.userid and t.week = c.week
8 and t.ftype = c.ftype and t.rid = c.rid
9 and t.cid = c.cid and
10 t.wdate < to_char(sysdate,'yy/mm/dd')),0)
11
12 end;
13 /
set logcnt = logcnt+nvl((SELECT sum(cnt)
*
4행에 오류:
ORA-06550: 줄 4, 열26:PLS-00103: 심볼 "SELECT"를 만났습니다 다음 중 하나가
기대될 때: ( - +
mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>
지: 줄 10, 열39:PLS-00103: 심볼 ","를 만났습니다 다음 중 하나가 기대될
때: ; return
returning and or
|