Thanks Larry, Emmitt and Charles. Yes indeed that was it. I just couldn't see it.

Dan

At 10:21 AM 4/14/2008, you wrote:
<<
create view clubnewv as select t1.f_name, t1.l_name, t1.badr, t1.badrst,t2.jobid, t2.jobadd1,t2.jobadd2,t3.sa_invoice_number,t4.sa_EQMT_kind from ARmain t1, jobsite t2, sa_main t3, sa_detail t4 where t1.custno = t2.custno and t2.jobid = t3.jobid and t3.sa_status <> "closed" and t2.jobid in (select jobid from joblist
where finalbill  between .vsavstrtdate and .vsavenddate)
>>

Your join conditions (in the WHERE clause) do not place any constraint on the relationship between sa_main and sa_detail. Presumably there's a primary key column in sa_main that relates to a foreign key column in sa_detail and that relationship needs to be included in the WHERE clause: AND t3.PKColumn = t4.FKColumn.
--
Larry

Dan Champion
 Service Department Manager
Vredevoogd Heating & Cooling
    Grandville, MI. 49418
        616-534-8271 x 14
     

Reply via email to