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. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

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

    Date2020.04.09 Byadmin Views4458
    read more
  3. SQL 에러 문의드립니다.

    Date2012.08.04 Byk.. Views15535
    Read More
  4. SQL 에러 문의 드립니다.

    Date2011.05.19 By호랑이새끼 Views15399
    Read More
  5. SQL statement violated NOT NULL constraint

    Date2023.03.15 Byyoo Views164
    Read More
  6. SPRING BOOT 2.X 버전연동 시 문제

    Date2019.02.15 By딩구징구 Views1483
    Read More
  7. SET, MULTISET, LIST과 같은 컬렉션 타입 컬럼에 저장된 원소의 갯수를 알고 싶습니다.

    Date2023.01.06 By새옹지마 Views130
    Read More
  8. SET SYSTEM PARAMETERS 질문 입니다.

    Date2013.10.20 Byphil Views7870
    Read More
  9. SELECT 쿼리 실행시 오류문제입니다.

    Date2011.02.24 By니코로빈 Views9707
    Read More
  10. SELECT 전체 갯수에 대해 질문 드리겠습니다.

    Date2020.04.17 By훈입니다. Views263
    Read More
  11. SELECT 실행 버그 보냅니다

    Date2016.06.30 By취우다 Views9351
    Read More
  12. SELECT 시, 필드 값의 대소문자 구분 없이 조건 검색 가능할까요?

    Date2011.04.02 By차오이 Views16381
    Read More
  13. SELECT 시 INDEX 를 타고 안타는 차이점 ?

    Date2020.12.17 ByRega Views396
    Read More
  14. SELECT FETCH 문제

    Date2018.03.07 By초보123 Views550
    Read More
  15. SAP Connection 관련 질문입니다.

    Date2019.01.09 Bychuci Views195
    Read More
  16. Rocky Linux 9에 큐브리드 9.3버전 설치

    Date2023.12.19 By범이 Views100
    Read More
  17. ResulstSet이 닫혔는데... 닫히는 이유가 먼가요?

    Date2011.06.10 By안지민 Views15607
    Read More
  18. Replication, 서버 이중화, HA

    Date2012.01.26 By승준77 Views23263
    Read More
  19. Release upgrade 문의

    Date2017.02.13 Byyscoma Views9138
    Read More
  20. Regexp_count

    Date2024.04.09 BySEO Views66
    Read More
  21. Redmine 의 데이터베이스로 큐브리드를 사용하는 것이 가능할까요?

    Date2018.04.17 By밝은마음 Views256
    Read More
  22. Redhat 8버전 tls 1.0 에러

    Date2024.01.30 By11시38분 Views120
    Read More
Board Pagination Prev 1 ... 146 147 148 149 150 151 152 153 154 155 ... 200 Next
/ 200

Contact Cubrid

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