สอบถามผู้รู้การดึงรายงานครับ ช้ามาก
ว่าสาเหตุเป็นเพราะอะไร
ขอบคุณครับ
select o.hn,concat(p.pname,p.fname," ",p.lname) as ptname,v.age_y,p.hometel,opd.bw,opd.height, '+
' dt.name,o.vstdate,o.nextdate '+
' from vn_stat v '+
' left outer join patient p on p.hn=v.hn '+
' left outer join oapp o on v.hn=o.hn '+
' left outer join opitemrece op on v.hn=op.hn '+
' left outer join drugitems dt on op.icode=dt.icode '+
' left outer join opdscreen opd on opd.hn=v.hn'+
' where o.vstdate between "'+ds1+'" and "'+ds2+'" '+
' and op.icode in ("1490164","1490163","1510908","1490166","1490076","1510909", '+
' "1460503","1490139","1470510","1510907","1460283","1460285","1430501","1490175","1490173","1500044","1500046","1500050", '+
' "1460526","1460562","1460286","1470002","1470003","1470004","1490167") '+
' group by dt.name '+
' order by o.vstdate ,o.hn