[thelist] SQL Statement Problems -- SOLVED
Jay Blanchard
jay.blanchard at niicommunications.com
Wed Jul 31 12:01:53 CDT 2002
Thanks Jonathan ... and the tip was excellent as well! The SQL statement
ends up being; (watch wrap)
SELECT s.btn, s.custName, t.instPayDate1, t.instPayAmt1, t.instPayStatus1,
t.instPayDate2, t.instPayAmt2, t.instPayStatus2,
t.instPayDate3, t.instPayAmt3, t.instPayStatus3
FROM tblSubscriber s, tblTracking t
WHERE t.btn = s.btn
AND s.btn = s.wtn
AND s.billStatus <> 'I'
AND t.instPayDate1 IS NOT NULL
AND t.instPayAmt1 > 0.01
AND ((t.instPayStatus1 <> 'paid' AND t.instPayStatus2 IS NULL AND
instPayStatus3 IS NULL)
OR (t.instPayStatus1 = 'paid' AND t.instPayStatus2 IS NOT NULL AND
t.instPayStatus2 <> 'paid' AND t.instPayStatus3 IS NULL)
OR (t.instPayStatus1 = 'paid' AND t.instPayStatus2 = 'paid' AND
t.instPayStatus3 IS NOT NULL AND t.instPayStatus3 <> 'paid'))
Thanks again!
Jay
I used to have a handle on life, but then it broke
***************************************
* *
* Texas PHP Developers Meeting *
* Spring 2003 *
* T Bar M Resort & Conference Center *
* New Braunfels, Texas *
* Interested? Contact; *
* jay.blanchard at niicommunications.com *
* *
***************************************
More information about the thelist
mailing list