jjpetrucelli
Programmer
i have a query that goes a little something like this;
SELECT t.id, t.name, ts.id1, ts.id2, ts.test_name, e.id3
FROM table t, table b, table ts, table e
WHERE t.id = b.id
AND b.id1 = ts.id1
AND b.id = e.id
AND b.id1 = e.id1
so thats ok but i need to add onto the end of it something that says 'the query also needs to meet this criteria;'
e.flag in ('2', '3') and e.flag1 = '1'
'or it can meet this criteria;'
e.flag in ('1', '2', '3') and e.flag1 = '3'
im getting a little caught up with this, ive tried just saying;
and e.flag in ('2', '3') and e.flag1 = '1'
or e.flag in ('1', '2', '3') and e.flag1 = '3'
Ive also tried several scenarios with ( ) but it just takes forever and brings back nothing!
SELECT t.id, t.name, ts.id1, ts.id2, ts.test_name, e.id3
FROM table t, table b, table ts, table e
WHERE t.id = b.id
AND b.id1 = ts.id1
AND b.id = e.id
AND b.id1 = e.id1
so thats ok but i need to add onto the end of it something that says 'the query also needs to meet this criteria;'
e.flag in ('2', '3') and e.flag1 = '1'
'or it can meet this criteria;'
e.flag in ('1', '2', '3') and e.flag1 = '3'
im getting a little caught up with this, ive tried just saying;
and e.flag in ('2', '3') and e.flag1 = '1'
or e.flag in ('1', '2', '3') and e.flag1 = '3'
Ive also tried several scenarios with ( ) but it just takes forever and brings back nothing!