Background Image

FORUM

조회 수 81 추천 수 0 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.

OS
리눅스 64 비트 
CUBRID Ver.
11.2
CUBRID TOOL Ver.
sqlgate
응용 환경(API)
 


* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.

 

에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------

함수 사용이 많고 쿼리문 작성시 함수 때문에 에러가 너무 자주나 

 

임시 테이블로 함수부분만 분리하여 쿼리를 만들었습니다. 

 

(함수를 사용한건 조인이 너무많고 데이터 가공이 필요해서 어쩔수 없는 부분이 있습니다. )

 

이렇게 해도 쿼리 성공 여부가 항상 일정하지가 않습니다. 계속 잘 실행되다가도

 

stored procedure .... 에러가 발생합니다. 왜 그럴까요???

 

with tmp as (
select 
 wh.reg_no,wh.rank_no,
 GET_CG_RD_SITE_NMS1(wh.reg_no, wh.rank_no) as GET_CG_RD_SITE_NMS1,
 GET_CD_NM('G',wh.lnd_r) as G_GET_CD_NM,
 GET_CG_WON_SML_RN(wh.reg_no, 1) as GET_CG_WON_SML_RN,
 GET_CG_WON_MK_NMS(wh.reg_no,wh.rank_no) as GET_CG_WON_MK_NMS,
 GET_CG_RD_DUP( wh.reg_no, wh.rank_no) as GET_CG_RD_DUP,
 GET_CG_RD_RANK(wh.reg_no) as GET_CG_RD_RANK
from won_his wh , reg_site_his rsh ,reg_mk_his rmh 
where wh.reg_no = rsh.reg_no 
and   wh.reg_no = rmh.reg_no
and   wh.rank_no = rsh.rank_no
and   wh.rank_no = rmh.rank_no
AND   wh.rank_no=1 
and   wh.reg_no='000125'
and rownum=1
)

select 
       wh.seq_no,
       FMT('D',wh.acc_dt) as acc_dt1, 
       to_number(wh.reg_no) as reg_no,
       to_number(wh.reg_no) as reg_no1,
       GET_CG_RD_SITE_NMS1 as RD_SITE_NM1, 
       IF(CHAR_LENGTH(RTRIM(wh.lnd_r)) > 0,'제'|| wh.lnd_r ||'호','') as LND_COMBO, 
       IF(CHAR_LENGTH(RTRIM(wh.acc_no)) > 0,'제'|| to_number(wh.acc_no) ||'호','') as ACC_COMBO,
       IF(length(wh.lnd_r)>1 and wh.land_chg='1','#','')||IF(wh.lnd_r='000','',G_GET_CD_NM)||IF(G_GET_CD_NM = '' and wh.lnd_r!='000','@','')||       
       IF(length(wh.lnd_r)>1 and wh.land_chg='1','#','')||IF(CHAR_LENGTH(RTRIM(wh.lnd_no)) > 0, to_number(wh.lnd_no) ||'호','')||IF(GET_CG_WON_SML_RN = '','@','')|| 
       IF(GET_CG_WON_SML_RN = '' and wh.sml_chg='1','#','')||GET_CG_WON_SML_RN as lnd_combo1,
       GET_CG_WON_MK_NMS as MK_NM,
       wh.reg_area, 
       FMT_DT(replace(dt_fr,'-',''),'M')||' '||IF(length(dt_fr)>2,'부터','') as dt_fr,
       FMT_DT(replace(dt_to,'-',''),'M')||' '||IF(length(dt_to)>2,'까지','') as dt_to,
       IF(wh.term_yr='0','',wh.term_yr)||IF(wh.term_yr='0','','년') as term_yr,
       FMT_DT(replace(dt_fr,'-',''),'M')||' '||IF(length(dt_fr)>2,'부터 ','')||FMT_DT(replace(dt_to,'-',''),'M')||' '||IF(length(dt_to)>2,'까지@','')||
       IF(wh.term_yr='0','',wh.term_yr)||''||IF(wh.term_yr='0','','년') as dt_info,
       to_char(term_yr) as lt,
       FMT_DT(replace(wh.reg_dt,'-',''),'M') as reg_dt1,
       case when reg_dt > '20011231' then '' else '광업 등록령 제91조에 의거 2001년 12 월 31일 전산이기' end as tt,
       rsh.chg_yn, 
       rmh.chg_yn as rmh_yn, 
       wh.area_chg, 
       wh.dt_chg,
       wh.reg_area|| ' ' ||decode(area_gbn,'1','평','0','ha') as reg_area_gbn, 
       IF(CHAR_LENGTH(RTRIM(armk_lst)) > 0,'부'||replace(armk_lst,',',', 부'),'') as R_ARMK_LST,
       decode(armk_no,'0','',IF(CHAR_LENGTH(RTRIM(armk_no)) > 0,'부기'|| armk_no ||'호','')) as R_ARMK_NO,          
       wh.land_chg,
       wh.sml_chg,
       wh.chg_cnt,  
       to_number(wh.reg_no) as reg_first,
       IF(GET_CG_RD_DUP = '','','광구중복@')||GET_CG_RD_DUP||
       IF(GET_CG_RD_DUP = '','','@')||wh.chg_cnt as DUP_REG_NO_NMS,
       GET_CG_RD_RANK as rankno
from  cg_won_his wh, cg_reg_site_his rsh, cg_reg_mk_his rmh,  tmp b
where wh.reg_no = rsh.reg_no 
and   wh.reg_no = rmh.reg_no
and   wh.reg_no = b.reg_no
and   wh.rank_no = rsh.rank_no
and   wh.rank_no = rmh.rank_no
and   wh.rank_no = b.rank_no
and wh.rank_no=1 
and wh.reg_no='000125'
and rownum=1;

 

  • ?
    유형규 2022.10.21 18:22
    불편을 드려서 죄송합니다.
    아래 글의 https://www.cubrid.com/qna/3839054와 관련된 이슈일 가능성이 있습니다.
    함수의 인수가 255자 이상의 문자열을 전달하는 경우 오류가 발생합니다.
    해당 문제는 11.2.2 patch에 반영중이며, 10월말 ~ 11월초 release 예정입니다.
  • ?
    오명환 2022.10.31 15:34
    11.2.2 patch version이 release 되었습니다.
    patch version으로 올려주신 문제가 해결되었는지 확인부탁드립니다.

    https://www.cubrid.com/release_note/3839380의 릴리즈 내용을 참고하세요.

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views136
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4477
    read more
  3. 컴퓨터 부팅 시 Unable to register the CUBRID Service Tray.Retry? 메세지 문의

    Date2013.03.04 Byconomia Views10291
    Read More
  4. 컴퓨터 부팅 시 Unable to register the CUBRID Service Tray.Retry? 메세지 문의

    Date2014.10.08 By나이젤 Views7422
    Read More
  5. 컴퓨터 이름 바꾼후 데이터베이스가 안보여요.

    Date2014.07.08 By그러게 Views2
    Read More
  6. 케릭터셋 문제입니다.

    Date2020.04.13 By훈입니다. Views365
    Read More
  7. 코드셋 호환문제

    Date2013.08.07 By잘생긴오빠 Views7376
    Read More
  8. 콘솔에서 csql로 접속할 때 인코딩 설정은 어떻게 하나요?

    Date2011.09.29 By안지민 Views11728
    Read More
  9. 콜렉션 타입 데이터 수정 방법에 대해서 질문이요....

    Date2013.03.16 By어린왕자 Views6276
    Read More
  10. 콤마로 split하는 기능 구현 관련 문의

    Date2023.03.15 By플레이어블 Views312
    Read More
  11. 쿼리 결과 질문

    Date2011.01.12 Byhyperhand Views8056
    Read More
  12. 쿼리 관련 문의 드립니다.

    Date2013.01.09 By오니오니 Views6078
    Read More
  13. 쿼리 관련 질문이 있습니다.

    Date2009.11.05 By미야프 Views8715
    Read More
  14. 쿼리 관련 질문하나 드릴께요

    Date2011.01.19 By잡동사니 Views7955
    Read More
  15. 쿼리 로그를 남기는 트리거 작성

    Date2020.12.12 By도여도여도여도여 Views164
    Read More
  16. 쿼리 문의 입니다.

    Date2010.05.28 By인경수 Views9691
    Read More
  17. 쿼리 문제

    Date2010.03.03 By소라게 Views9671
    Read More
  18. 쿼리 브라우저 실행 오류

    Date2014.06.12 By이현세 Views11469
    Read More
  19. 쿼리 브라우저에서 유저별 현재 사용 data 용량확인 하는 방법 좀 알려주세요

    Date2014.09.05 By황선욱 Views10668
    Read More
  20. 쿼리 브라우져 가져오기 오류 질문

    Date2013.12.08 Byjoke7 Views10928
    Read More
  21. 쿼리 브라우져 가져오기 오류 질문

    Date2013.12.24 Byjoke7 Views8810
    Read More
  22. 쿼리 브라우져 내보내기 기능 관련

    Date2016.10.07 By처음처럼초보 Views13
    Read More
Board Pagination Prev 1 ... 155 156 157 158 159 160 161 162 163 164 ... 201 Next
/ 201

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales