句の一部である値を正しく返すこのクエリがありますIN
が、に変更するとNOT IN
、何も返されません。
誰か提案はありますか?
select distinct
CAST( w.work_area AS CHAR(4) ) || s.code_id as WATT
from
sys_code s,
work_area_master w
where
s.code_type = '590'
and (
CAST( w.work_area AS CHAR(4)) || s.code_id
)
in (
select substr(misc_flags, 1,6)
from sys_code where code_type = 'STA'
);