BMS-HOSxP Community
HOSxP => การเขียน SQL Script => ข้อความที่เริ่มโดย: Knott ที่ เมษายน 29, 2008, 11:51:58 AM
-
ต้องการดึงข้อมูล ผู้ป่วย ที่อยู่ หมู่ 1,2,8,9,10,11,13,14 ต.ดอนทอง และ หมู่ 1,6,7,8,9 ต.บ้านป่า อ.เมือง จ.พิษณุโลก ต้องเขียนยังไงครับ
-
ลองอันนี้ดูครับ
select * from patient
where (chwpart='65' and amppart='08' and tmbpart='11' and moopart in ('1','2','8','9','10','11','13','14'))
or (chwpart='65' and amppart='01' and tmbpart='09' and moopart in ('1','6','7','8','9'))
-
ขอบคุณครับ