Value :=GetSQLintegerData('select count(pvl.person_id) '+
' from person p,house h,village v,person_vaccine_list pvl,person_vaccine pv '+
' where p.house_id=h.house_id and '+
' h.village_id = v.village_id and '+
' pvl.person_vaccine_id=pv.person_vaccine_id and '+
' pvl.person_id=p.person_id and '+
' p.death = "N" and '+
' pv.vaccine_code in ("MEAS","MMR") and '+
' p.birthdate between "'+ds1+'" and "'+ds2+'" and '+
' v.village_id = ' + DBPipeline['village_id'] );
ลองแบบนี้จะได้ป่าวนะ