这是我的代码:
SELECT t.obsid, t.seq_nbr, t.charge_ao_str
, t.approved_exposure_time, t.status, t.uninterrupt
, t.phase_constraint_flag, t.multitelescope
, t.multitelescope_interval, t.constr_in_remarks
, t.remarks, t.window_flag, t.roll_flag, t.monitor_flag
, t.pre_id, t.pre_min_lead, t.pre_max_lead, r.roll_constraint
, r.roll_180, r.roll, r.roll_tolerance, w.window_constraint
, w.tstart, w.tstop, p.phase_period, p.phase_epoch
, p.phase_start, p.phase_end, p.phase_start_margin, p.phase_end_margin
FROM target t, rollreq r, timereq w, phasereq p
WHERE t.obsid=r.obsid
AND t.obsid=w.obsid
AND t.obsid=p.obsid
AND t.charge_ao_str='13'
AND (t.status <> 'canceled' OR t.status <> 'untriggered')
AND
(
(t.uninterrupt='Y' OR t.uninterrupt='P') OR
(t.phase_constraint_flag='Y' OR t.phase_constraint_flag='P') OR
(t.multitelescope='Y' OR t.multitelescope='P') OR
(t.constr_in_remarks='Y' OR t.constr_in_remarks='P') OR
(t.window_flag='Y' OR t.window_flag='P') OR
(t.roll_flag='Y' OR t.roll_flag='P') OR
(t.monitor_flag='Y' OR t.monitor_flag='P')
)
它似乎只识别语句t.charge_ao_str='13'
中的WHERE
,而没有别的。我怎样才能使WHERE
语句的其余部分起作用?