Obsidian/Recognition/Work Related/1.업무메모/2023-03-29.md

12 lines
702 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
-- EAI -> 업무테이블 작업
```SQL
SELECT to_timestamp(DATEANDTIME, 'yyyy.mm.dd hh24:mi:ss.ff') as DATEANDTIME -- KST
, to_timestamp(TMSTMP, 'yyyy.mm.dd hh24:mi:ss.ff') as TMSTMP -- UTC
, to_timestamp(FLYNGPLNCRTNDTTM, 'yyyy.mm.dd hh24:mi:ss.ff') as FLYNGPLNCRTNDTTM -- UTC
, to_timestamp(substr(RECV_TIME, 1, LENGTH(RECV_TIME) -3) || '.' || substr(RECV_TIME, -1) , 'yyyy.mm.dd hh24:mi:ss.ff') as RECV_TIME -- KST
, to_timestamp(DATEANDTIME, 'yyyy.mm.dd hh24:mi:ss.ff') - to_timestamp(substr(RECV_TIME, 1, LENGTH(RECV_TIME) -3) || '.' || substr(RECV_TIME, -1) , 'yyyy.mm.dd hh24:mi:ss.ff') as datatime_RecvTime
FROM EAI_ELECSTRIPDEPARTS_RCV
where expArrDepDt = '20230320'
```