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 쿼리문 사용해서 검색하려 하고 있습니다.
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 를 참고해주세요
감사합니다.