BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: Innera ที่ กรกฎาคม 29, 2013, 09:38:20 AM
-
ทำรายงานเกี่ยวกับการรอเวลาของห้องแล๊บ แล้วเจอปัญหา range check error ครับ
ไม่ทราบว่ามีวิธีแก้ไขยังไงบ้างครับ
ลองทำตามกระทูนี้ดูแล้วไม่หาย
http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=187.0
โค้ดที่ใช้ครับ
SELECT p.hn,concat(p.pname,p.fname," ",p.lname) as ptname,l.form_name,l.department,
l.order_time,l.report_time, sec_to_time(time_to_sec(l.report_time)-time_to_sec(l.order_time)) as watingtime
FROM lab_head l
left outer join patient p on p.hn=l.hn
where l.order_date between "2013-01-01" and "2013-01-31" o
rder by l.department,l.form_name;
-
เพิ่มเงื่อนไข report_time > order_time ด้วยครับ
-
ขอบคุณครับ :D