แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mike_tok

หน้า: [1]
1
ขอความกรุณา เรื่อง SQL มาใส่ในรูปแบบ report ด้วยครับ ครับ

select i.an,i.hn, concat(p.fname,"  ",p.lname,",",p.pname) as PtName,
pt.name as PtType,concat(i.regdate," ",i.regtime) as AdmDate,w.name as Ward,
sp.name as PtSpec,d.name as AdmDoctor,i.prediag,ov.name as ComeFromSt,ou.name as AdmUser
from ipt i
left outer join ovstist ov on ov.ovstist = i.ivstist
left outer join patient p on p.hn = i.hn
left outer join ward w on w.ward = i.ward
left outer join doctor d on d.code = i.admdoctor
left outer join opduser ou on ou.loginname = i.staff
left outer join pttype pt on pt.pttype = i.pttype
left outer join spclty sp on sp.spclty = i.spclty
left outer join an_stat an on an.an = i.an
where  i.regdate between "2020-10-26" and "2020-10-26"

2
เอาแบบ พร้อมใช้งานเลย พอจะมีไหมครับ

หน้า: [1]