Background Image

FORUM

조회 수 80 추천 수 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 Views65
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4465
    read more
  3. 추가문의가 있는 경우, 새 글을 적는게 좋을까요, 기존 글에 댓글 다는게 좋을까요?

    Date2022.11.16 By키롱 Views40
    Read More
  4. cubrid migration toolkit / oracle → cubrid / oracle의 jdbc 이슈 ( java.lang.RuntimeException: JDBC driver can't be null. ) (해결)

    Date2022.11.15 By키롱 Views145
    Read More
  5. cubrid 성능 수집 관련...

    Date2022.11.14 By무돌이 Views76
    Read More
  6. 뷰 생성 후 조회하는데 원본 쿼리와 갯수가 다릅니다

    Date2022.11.11 By플레이어블 Views52
    Read More
  7. clob 이미지 파일로 다운로드

    Date2022.11.11 By토리 Views239
    Read More
  8. CUBRID Manager(11.0.0.0001) Python Driver 설치 오류

    Date2022.11.10 Bymetalk2003 Views125
    Read More
  9. 큐브리드 방화벽 관련해서 질문있습니다.

    Date2022.11.08 By사블 Views172
    Read More
  10. 큐브리드 매니저 -> 데이터베이스 복구 오류 문제 문의

    Date2022.11.07 BypropolisCandy Views53
    Read More
  11. 큐부리드 함수 문의

    Date2022.11.07 Byozro Views117
    Read More
  12. ADO.NET 에서 connection pool 사용 가능한가요?

    Date2022.11.04 By시나브로 Views34
    Read More
  13. oracle_style_empty_string 설정 클라이언트 단에서 조회

    Date2022.11.04 Byhjeong Views56
    Read More
  14. HA 이중화 구성 시에 master, slave 관련하여 질문 드립니다.

    Date2022.11.02 Byk1n9 Views168
    Read More
  15. ubuntu:20.04 cubrid 설치 문의

    Date2022.11.01 Bygreen_auth Views90
    Read More
  16. 큐브리드에서 테이블 용량, 로우사이즈 검색방법

    Date2022.10.28 By차솨 Views563
    Read More
  17. 타 큐브리드 db에 insert 하려면..

    Date2022.10.28 By백수인 Views120
    Read More
  18. 큐브리드 디렉토리 용량 문의

    Date2022.10.28 By김상원 Views75
    Read More
  19. SQLGate 데이터 내보내기 오류

    Date2022.10.25 By써늬니 Views167
    Read More
  20. 스키마 내려받기 문의

    Date2022.10.24 Byozro Views68
    Read More
  21. 저장프로시저 샘플 테스트 에러 Invalid call: it can not return ResultSet.

    Date2022.10.21 By흔색늑대 Views126
    Read More
  22. 쿼리 실행 성공 여부가 일정하지 않습니다.

    Date2022.10.21 Byozro Views80
    Read More
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 ... 200 Next
/ 200

Contact Cubrid

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