51
แจ้งปัญหา / ขอความช่วยเหลือ / ช่วยตรวจสอบโค๊ดให้หน่อยครับเพราะว่าลบหรือเพิ่มโรคผมไม่เท่ากันครับ
« เมื่อ: พฤษภาคม 10, 2010, 10:22:23 AM »
รบกวน ช่วยตรวจสอบโค๊ดให้หน่อยครับ เพราะว่า ลบหรือเพิ่มโรค ตรง and v.pdx!="Z4" and v.pdx!="Z348" ข้อมูลทีได้ไม่ตรงกันครับ นี่โค๊ดครับ... แนบรูปมาด้วยครับ
ขอรบกวนถามอีกอย่างครับ อยากรู้ว่าจะใช้คำสั่งยังไงครับ ว่าจะไม่เอาโรคที่ขึ้นต้นด้วย"Z..." ประมาณนี้ครับ คือไม่เอาโรคที่ขึ้นต้นด้วย Zครับผม ต้องเขียนโค๊ดยังไงครับ
เคยลองใช้ v.pdx != "Z%%" ก็ไม่ได้หรือว่าเขียนไม่ถูก
select v.pdx,b.name,count(distinct v.vn) as visit,count(distinct v.hn) as count_hn ,t.name
from vn_stat v
left outer join thaiaddress t on v.aid = t.addressid
left outer join icd101 b on v.pdx=b.code
where v.vstdate between "2008-10-01" and "2009-09-30" and t.addressid="421302"
and moopart= "9" and v.pdx !="" and v.pdx!="Z4" and v.pdx!="Z348"group by b.tname
order by visit desc
ขอรบกวนถามอีกอย่างครับ อยากรู้ว่าจะใช้คำสั่งยังไงครับ ว่าจะไม่เอาโรคที่ขึ้นต้นด้วย"Z..." ประมาณนี้ครับ คือไม่เอาโรคที่ขึ้นต้นด้วย Zครับผม ต้องเขียนโค๊ดยังไงครับ
เคยลองใช้ v.pdx != "Z%%" ก็ไม่ได้หรือว่าเขียนไม่ถูก
select v.pdx,b.name,count(distinct v.vn) as visit,count(distinct v.hn) as count_hn ,t.name
from vn_stat v
left outer join thaiaddress t on v.aid = t.addressid
left outer join icd101 b on v.pdx=b.code
where v.vstdate between "2008-10-01" and "2009-09-30" and t.addressid="421302"
and moopart= "9" and v.pdx !="" and v.pdx!="Z4" and v.pdx!="Z348"group by b.tname
order by visit desc