SELECT ID,              
       RSE_ID,          
       ROAD_SPOT_ID,    
       LOG_CNNC_ID,     
       LOG_CNNC_PW,     
       ISTL_LCTN_NM,    
       LCTN_X,          
       LCTN_Y,          
       IP,              
       PORT,            
       MNFC_CMPY_CD,    
       DEL_YN           
  FROM TB_RSE_MSTR      


-- 등록 시설물
SELECT 'DSRC'  AS FAC_TYPE, RSE_ID       AS FAC_ID, ISTL_LCTN_NM AS FAC_NM, DEL_YN 
  FROM TB_RSE_MSTR                                                                
 WHERE DEL_YN = 'N'                                                               

--시설물 상태
SELECT 'DSRC' AS FAC_TYPE, ID AS FAC_ID, 
       DECODE(CMNC_STTS, 'CMS0', '1', 'CMS1', '0', '2') AS COMM,
       '0' AS DOOR
  FROM TB_RSE_STTS_PNST 
 WHERE CLCT_DT >= TO_CHAR(SYSDATE-2/1440, 'YYYYMMDDHH24MISS')

