1
Report Exchange / Re: ช่วยดู Code รายงาน CMI ให้ทีจ้า
« เมื่อ: สิงหาคม 05, 2012, 15:49:46 PM »
ผมต้องการ ผลรวม ADJRW แยก OR และ NonOR
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
คำสั่ง like"F20%" น่าจะหายไปนะครับผมใช้คำสั่งนี้ครับ ช่วยอาจารย์ดูที่ครับว่าใช้ได้ไหม
... น่าจะเป็น ...
if gl1='OPD' then
Value := GetSQLIntegerData('select count(vn) as c_an from vn_stat'+
' where vstdate between "'+ds1+'" and "'+ds2+'"'+
' and (pdx between "F20" and "F25" or pdx between "F28" and "F29"');
if gl1='IPD' then
Value := GetSQLIntegerData('select count(an) as c_an from an_stat'+
' where regdate between "'+ds1+'" and "'+ds2+'"'+
' and (pdx between "F20" and "F25" or pdx between "F28" and "F29"');
... หรือ ...
if gl1='OPD' then
Value := GetSQLIntegerData('select count(vn) as c_an from vn_stat'+
' where vstdate between "'+ds1+'" and "'+ds2+'"'+
' and (pdx between "F20" and "F25" or pdx between "F28" and "F29"')
else
Value := GetSQLIntegerData('select count(an) as c_an from an_stat'+
' where regdate between "'+ds1+'" and "'+ds2+'"'+
' and (pdx between "F20" and "F25" or pdx between "F28" and "F29"');