Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

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

access_date="2019-03-29" access_time="15:40:25"

access_date="2019-03-29" access_time="15:40:26"

access_date="2019-03-29" access_time="15:40:28"

access_date="2019-03-29" access_time="15:40:30"

access_date="2019-03-29" access_time="15:40:32"



큐브리드 DB에 이런 형식으로 저장됩니다.


이 date, time 컬럼을 합쳐서 값이 20190329154028로 변환하는 방법좀 알려주시면 감사하겠습니다.

date, time 컬럼 데이터 타입은 문자형(Varchar)형 입니다.


변환 후 하나의 값이 timestamp 형식으로 변환되는 방식 말고 date, time 컬럼을 변환해서 timestamp 형식으로 변환되는 방법을 알려주시면 감사하겠습니다.


변환 후 SELECT 쿼리문 사용해서 검색하려 하고 있습니다.

  • ?
    큐브리드_김주현 2019.04.01 10:58
    큐브리드를 이용해 주셔서 감사합니다.

    csql> select * from temptable;
    === <Result of SELECT Command in Line 4> ===

    id adate atime
    =========================================================
    1 '2019-03-29' '15:40:25'
    1 rows selected. (0.028161 sec) Committed.

    csql> select translate(adate, '-', '')||translate(atime,':','') from temptable;
    === <Result of SELECT Command in Line 1> ===
    translate(adate, '-', '')|| translate(atime, ':', '')
    ======================
    '20190329154025'
    1 rows selected. (0.014618 sec) Committed.

    위와같이 진행 해보세요..
    (주의할 점은 cubrid.conf에서oracle_style_empty_string=no(기본값)인 경우입니다.

    다른 함수를 사용하시려면 https://www.cubrid.org/manual/ko/9.3.0/sql/function/string_fn.html#id1 를 참고해주세요
    감사합니다.
  • ?
    루이지 2019.04.11 15:35
    해당 CUBRID 2008 R2.2 에서는 해당 쿼리를 입력하였는데 select translate('adate', '-', '')||translate('atime',':','') from temptable;

    logtim="access_dateaccess_time"
    logtim="access_dateaccess_time"
    logtim="access_dateaccess_time" 이렇게 뜹니다.

    다른 변환 방법을 알수 있을까요?
  • ?
    큐브리드_김주현 2019.04.11 16:54
    select replace(adate,'-')||replace(atime,':') from temptable;

  1. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4443
    read more
  2. Log 문의

    Date2021.06.25 Byjungsin Views113
    Read More
  3. JAVA VM is not running 오류

    Date2021.06.25 Byjungsin Views889
    Read More
  4. cubrid가 실행이 안됩니다.

    Date2021.06.23 By푸른호랑이 Views245
    Read More
  5. 큐브리드의 테이블 생성일시, 수정일시 등을 확인 할 수 있는 쿼리를 알고싶습니다.

    Date2021.06.22 By풍류인생 Views694
    Read More
  6. 서버에서 broker 에러가 발생합니다.

    Date2021.06.21 By동구리 Views1476
    Read More
  7. iso8601을 cast하려면 어떻게 해야되나요?

    Date2021.06.21 By자등명법등명 Views157
    Read More
  8. 큐브리드 업타임 확인은 어떻게 하나요

    Date2021.06.21 ByJi Views86
    Read More
  9. 파일 업로드 시 생기는 DB 다운

    Date2021.06.14 By오렌지 Views236
    Read More
  10. 혼합형 데이터 정렬 방법

    Date2021.06.14 By큐키 Views264
    Read More
  11. Docker에 설치된 큐브리드에서 cubrid server stop이 안됩니다.

    Date2021.06.13 By새옹지마 Views429
    Read More
  12. VIEW SELECT 오류 (실행오류: -494)

    Date2021.06.11 Bytenbirds Views460
    Read More
  13. 혼합형 데이터 정렬방법

    Date2021.06.11 By큐키 Views85
    Read More
  14. 두 가지 테이블의 컬럼을 검색해서 업데이트 하는 쿼리

    Date2021.06.09 Byots21 Views733
    Read More
  15. php 7.3 + Cubrid 8.4.4 연동 문제

    Date2021.06.08 By땡땡이 Views86
    Read More
  16. 파라미터 바인드 문제..

    Date2021.06.04 By오션나인 Views261
    Read More
  17. .AccessViolationException (C#)

    Date2021.06.03 Byswift Views218
    Read More
  18. 큐브리드 커맨드 내 spool과 set echo 의 사용가능 여부

    Date2021.06.01 By솨솨솨 Views1991
    Read More
  19. 에러가 왜 날까요... 잘 입력 되다가 이런 에러가 나네요.. 파이선 사용자입니다.

    Date2021.05.27 By오션나인 Views897
    Read More
  20. 큐브리드에서 오프소스 Talend 사용 가능한 지 문의드립니다.

    Date2021.05.24 By본부장 Views184
    Read More
  21. CUBRID 매니저에서 뷰 편집 -> SQL문 보기시 SQL이 너무 길어 짤리는 현상

    Date2021.05.24 By테크 Views284
    Read More
Board Pagination Prev 1 ... 23 24 25 26 27 28 29 30 31 32 ... 200 Next
/ 200

Contact Cubrid

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