SELECT * FROM POLICE_STATION_APPLY_REASON left join TASK on POLICE_STATION_APPLY_REASON.TASK_ID = TASK.TASK_ID left join CITY_DIC on TASK.CITYCODE = CITY_DIC.CITYCODE where CITYNAME=#{cityname}
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where CITYCODE=#{citycode}
SELECT * FROM POLICE_STATION_APPLY_REASON left join COUNTY_LIST on POLICE_STATION_APPLY_REASON.TASK_ID=COUNTY_LIST.TASK_ID left join COUNTY_DIC on COUNTY_LIST.COUNTY_CODE = COUNTY_DIC.COUNTY_CODE where COUNTYNAME=#{countyname}
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where COUNTY_CODE=#{county_Code}
SELECT * FROM POLICE_STATION_APPLY_REASON left join GAJG_DM on POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE = GAJG_DM.GAJG_DM where GAJG_MC=#{gajg_MC}
select POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,GAJG_DM.GAJG_MC,COUNTY_DIC.COUNTYNAME,CITY_DIC.CITYNAME from POLICE_STATION_APPLY_REASON left join GAJG_DM on GAJG_DM.GAJG_DM = POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE left join COUNTY_DIC on COUNTY_DIC.COUNTY_CODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,5) left join CITY_DIC on CITY_DIC.CITYCODE = substr(POLICE_STATION_APPLY_REASON.POLICE_STATION_CODE,0,3) where POLICE_STATION_CODE=#{police_Station_Code}