• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
조회 수 : 3426
2010.08.19 (13:33:45)
게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.

* 고객시스템명 : 종합정보 시스템
* TOInB 버전 :
* 서버 Platform :
* 문의 유형(질문/요청/참조) :
* 내용 :

  어제 전화 드려서 샘플 소스를 받아 해보앗었는데 잘 되지 않았습니다.
그래서 다시 문의 드립니다.

좀 변경을 해서
프로시져 사용 안하고 처리 하게 해보려고 합니다.

아래 소스 처럼 처리 하려 하는데

TB_BOOL isa889w_00_t02_01_TB_begin_work ( TB_SESSION_PGV *spgv )
{
/* To Do, Add your script here */

                EXEC-SQL
                        /*저열라 처리를 위한 점수를 뽑는다.*/
                select
                ((select min(jumsu) from isa889m where year = 2010 and  incol > (select trunc(count(*) * 0.7) from isa889m where year = 2010))-
                (select min(jumsu) from isa889m where year = 2010 and incol > (select trunc(count(*) * 0.25) from isa889m where year = 2010)))*1.5 as tot
                                        into   :V_seq
                from isa889m where year = 2010
                group by year;
                        
                        fprintf(stderr,"event1111-seq=>[%d]\n",V_seq);
                        
                EXEC-SQL
                        /*점수 이하자 저열자 처리*/
                        update isa889m set chk = 'Y' where year = 2010 and jumsu < :V_seq;
                        
                        
                        fprintf(stderr,"event2222-seq=>[%d]\n",V_seq);
                        
                if (TBL_ERROR_CODE < 0){
                        return (TB_FAIL);  
                }
                
        return (TB_SUCC);
}


row_no-seq=>[2010]  -- 넘어 오는 변수
event1111-seq=>[6]  -- event 에서 구한 값
event2222-seq=>[6]

이렇게 값은 나오는데 select 다음에 update 를 사용을 하면 에러가 나는데

이렇게 처리 하면 안되는 건가 해서 문의 드립니다.
 
Tag List
XE Login