일단 안되는 문법입니다.
이런걸 인라인뷰., 서브쿼리 하라????
어찌됬껀 안되구요
대략 join 으로 처리 할수있는 상황 같은데
꼭 그렇케 하실라문
select aa a, bb b, cc c from atabel where 조건
: union all
: select ab a, ba b, ca c from btable where 조건
: union all
: select da a, db b, dc c from ctable where 조건
일단 이걸 리턴값들 있는 프로시저를 만들구요
프로시저 호출 하면서 group 처리 하면될것입니다.
select a, sum(b) b1, sum(c) c1 from 프로시져명(:조건)
group by a
왕초보 님이 쓰신 글 :
: 항상 많은 관심 감사드립니다.
:
: 제가 알고 싶은 것은
: select a, sum(b) b1, sum(c) c1 from
: select aa a, bb b, cc c from atabel where 조건
: union all
: select ab a, ba b, ca c from btable where 조건
: union all
: select da a, db b, dc c from ctable where 조건
: group by a;
:
: 실행하면
: Dynamic SQL Error
: SQL error code = -104
: Token unknown - line 2, char 0
: select
: 오류가 나옵니다.
:
: 고수님들 많은 가르침 부탁드립니다.
:
: 삭제 : 0000
|