BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: auing ที่ ตุลาคม 31, 2012, 10:11:26 AM

หัวข้อ: มีสถานีไหนมีรายงานเกี่ยวกับงานกายภาพบ้างครับ
เริ่มหัวข้อโดย: auing ที่ ตุลาคม 31, 2012, 10:11:26 AM
ขออนุญาตขอตัวอย่างรายงานเกี่ยวกับงานกายภาพบำบัดด้วยครับ
เช่น ใช้ไม้ค้ำยันให้ผู้ป่วยกี่อันแล้วรถเข็นกี่คันประมาณนี้ครับ..ขอบคุณครับ
หัวข้อ: Re: มีสถานีไหนมีรายงานเกี่ยวกับงานกายภาพบ้างครับ
เริ่มหัวข้อโดย: nongtan ที่ ตุลาคม 31, 2012, 10:29:54 AM
ผมใช้แบบนี้อยู่ครับ
select o.vstdate,o.icode,nd.name,count(o.icode) as counticode
,sum(o.qty) as sumqty,sum(o.sum_price) as sumsumprice
 from opitemrece o
 left outer join nondrugitems nd on nd.icode=o.icode
 where o.vstdate between "2012-10-01" and "2012-10-20"
       and o.icode in(select icode from nondrugitems where income="14") and o.icode<>"3904956"
 group by o.icode
 order by o.icode
หัวข้อ: Re: มีสถานีไหนมีรายงานเกี่ยวกับงานกายภาพบ้างครับ
เริ่มหัวข้อโดย: auing ที่ ตุลาคม 31, 2012, 10:54:46 AM
ผมใช้แบบนี้อยู่ครับ
select o.vstdate,o.icode,nd.name,count(o.icode) as counticode
,sum(o.qty) as sumqty,sum(o.sum_price) as sumsumprice
 from opitemrece o
 left outer join nondrugitems nd on nd.icode=o.icode
 where o.vstdate between "2012-10-01" and "2012-10-20"
       and o.icode in(select icode from nondrugitems where income="14") and o.icode<>"3904956"
 group by o.icode
 order by o.icode

ขอบคุณครับ ;D ;D