Can someone get the query below to work? I need to query several different ranges of values in one query.
select ts,tr.loc_n,bus,route,ttp,grp,des,seq,tpbc
from tr, ppd
where ts >= '2013-09-01 04:00:00.000' and ts <= '2013-10-01 03:59:00.000'
and tr.loc_n=ppd.loc_n
and tr.id=ppd.id
and tr.tr_seq=ppd.tr_seq
and seq between 9262 and 9333
or seq between 9348 and 9361
or seq between 9396 and 9427
and tpbc in (100)
and ttp in (25)
order by ts;
select ts,tr.loc_n,bus,route,ttp,grp,des,seq,tpbc
from tr, ppd
where ts >= '2013-09-01 04:00:00.000' and ts <= '2013-10-01 03:59:00.000'
and tr.loc_n=ppd.loc_n
and tr.id=ppd.id
and tr.tr_seq=ppd.tr_seq
and seq between 9262 and 9333
or seq between 9348 and 9361
or seq between 9396 and 9427
and tpbc in (100)
and ttp in (25)
order by ts;