ลองดูก่อนนะคะว่าใช้ได้ไหม
select v.vstdate,p.cid,p.hn,concat(p.pname,p.fname," ",p.lname) as tname,p.sex,v.age_y,
p.pttype,pt.name,h.name,d.licenseno,d.name
from vn_stat v
left outer join patient p on p.hn = v.hn
left outer join hospcode h on h.hospcode = v.hospmain
left outer join doctor d on d.code = v.dx_doctor
left outer join pttype pt on pt.pttype = v.pttype
where v.vstdate between '2009-12-01' and '2009-12-02'
and hospmain = '11082'
and v.pttype = '34'