I have two tables with 13 columns of values each - e.g. week1, week2,
week3...week13.
I want to check if any (t1.week1 0 AND t2.week1 0) or (t1.week2 >
0 AND t2.week2 0), and so on...
In fact, the where clause currently looks like:
3 where (f.week1 0 and o.week1 0)
4 or (f.week2 0 and o.week2 0)
5 or (f.week3 0 and o.week3 0)...
I also would like to be able to somehow identify the weeks in question
- it could be week1 for part1, week4 for part2, and weeks3 and 12 for
part3.
Currently, I have a huge statement like above, where it AND's the
similar weeks, and OR's each weekly comparison step. The table only
has 2892 rows, and I am getting 45871 rows returned from my sql.
Thanks for any assistance!!!
week3...week13.
I want to check if any (t1.week1 0 AND t2.week1 0) or (t1.week2 >
0 AND t2.week2 0), and so on...
In fact, the where clause currently looks like:
3 where (f.week1 0 and o.week1 0)
4 or (f.week2 0 and o.week2 0)
5 or (f.week3 0 and o.week3 0)...
I also would like to be able to somehow identify the weeks in question
- it could be week1 for part1, week4 for part2, and weeks3 and 12 for
part3.
Currently, I have a huge statement like above, where it AND's the
similar weeks, and OR's each weekly comparison step. The table only
has 2892 rows, and I am getting 45871 rows returned from my sql.
Thanks for any assistance!!!
Comment