Obsidian/Recognition/Work Related/1.업무메모/2022.04/2022-04-04.md

16 lines
441 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
-- 자료생성
INSERT INTO TH_VHF_202203
SELECT CALL_MMSI , '.', call_rs, result_lon, result_lat, result_dt
FROM TB_VHFPOLLING_LOG_202203
WHERE 1=1
AND result_lat IS NOT NULL;
-- rsid 갱신 (rsid, bsid 매칭 안되면 '.')
UPDATE TH_VHF_202203 a
SET bsid = nvl((SELECT bsid FROM tmp_bsid WHERE rsid = a.rsid), '.') ;
-- bsid 매칭 확인
SELECT (SELECT bsid FROM tmp_bsid WHERE rsid = a.rsid) AS bsid_cnv, a.*
FROM TH_VHF_202203 a ;