<<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 ARmaint1, jobsite t2, sa_main t3, sa_detail t4 where t1.custno = 
t2.custno andt2.jobid = t3.jobid and t3.sa_status <> "closed" andt2.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


Reply via email to