幫助需要這個查詢的輸出組合together.How是可以做到的?TQ如何組合這些SQL查詢以便它可以顯示一個輸出?
select facility, route, operation, script_id
from F_ROUTEOPER
where facility = 'A01' and operation in ('6910','7976')
AND src_erase_date is null
and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'
AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
select facility, route, operation, script_id
from F_ROUTEOPER
where facility = 'A01' and operation in ('6912','7976')
AND src_erase_date is null
and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'
AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
select facility, route, operation, script_id
from F_ROUTEOPER
where facility = 'A01' and operation in ('7344','7976')
AND src_erase_date is null
and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'
AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
select facility, route, operation, script_id
from F_ROUTEOPER
where facility = 'A01' and operation in ('8344','7976')
AND src_erase_date is null
and (script_id not in ('PHQ-LOTCHKRV','PHQ-LOTCHK') or script_id is null)
AND (route NOT LIKE '9EL%' AND route NOT LIKE '9TB%'
AND route NOT LIKE 'BLB%' AND route NOT LIKE 'BWR%' AND route NOT LIKE 'CRL%')
當你想想看,這是一個愚蠢的問題,需要一點點的邏輯。 –