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 Views49
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4458
    read more
  3. 특정 컬럼 order by 시 한글 > 숫자 > 영문 순으로 정렬 방법?

    Date2022.12.01 ByQubrid Views442
    Read More
  4. 클라우드 환경에서 데이터베이스 추가 관련

    Date2022.11.29 By디콘플러스 Views68
    Read More
  5. csql로 sql파일 실행 시 변수 전달

    Date2022.11.29 By공도비 Views136
    Read More
  6. Cubrid 이용 관련 문의 - 데이터 손실

    Date2022.11.24 Byflash Views174
    Read More
  7. select 문의 응답속도가 느립니다.

    Date2022.11.22 Bysteve Views157
    Read More
  8. 큐브리드 검색 초건 총 개수 구하는 함수나 방법알고 싶어요.

    Date2022.11.22 By우유악마 Views250
    Read More
  9. create table 시 응답이 없습니다.

    Date2022.11.22 Bysteve Views105
    Read More
  10. 볼륨 확장 문의드립니다.

    Date2022.11.22 ByChes Views93
    Read More
  11. 오라클 패키지 마이그레이션

    Date2022.11.21 By은정 Views93
    Read More
  12. 오프라인 상태에서 큐브리드(11.2) 설치 시 필요 라이브러리 파일 관련 문의 드립니다

    Date2022.11.21 Bygidoree Views69
    Read More
  13. clob 마이그레이션 문의 사항

    Date2022.11.21 BysTricky Views105
    Read More
  14. cubrid migration toolkit / CLOB 인코딩 이슈 해결방안 문의 (해결)

    Date2022.11.18 By키롱 Views434
    Read More
  15. cubrid migration toolkit / Java heap space. Migration is interrupted (해결)

    Date2022.11.18 By키롱 Views48
    Read More
  16. CUBRID DB Link insert, update, delete

    Date2022.11.17 By리들러 Views133
    Read More
  17. cubrid migration toolkit / oracle → cubrid / CLOB 의 한글 깨짐 (해결)

    Date2022.11.16 By키롱 Views156
    Read More
  18. 추가문의가 있는 경우, 새 글을 적는게 좋을까요, 기존 글에 댓글 다는게 좋을까요?

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

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

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

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

    Date2022.11.11 By토리 Views235
    Read More
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 ... 200 Next
/ 200

Contact Cubrid

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