ได้มาแล้วครับ
ขอบคุณครับ
select concat(p.pname, ' ',p.fname, ' ',p.lname) as ptname ,p.pttype,ptt.name as pttype_name ,o.* , os.*,r.room_name ,
er.emergency_name ,s.name ,i.name as prov_diag_name ,w.name as ward_name ,dr.name,
ot.anes_name ,oa.*
from operation_list o
left outer join doctor dr on dr.code=o.request_doctor
left outer join patient p on p.hn=o.hn
left outer join pttype ptt on ptt.pttype=p.pttype
left outer join operation_screen_in os on os.operation_id=o.operation_id
left outer join operation_room r on r.room_id=o.room_id
left outer join operation_emergency er on er.emergency_id=o.emergency_id
left outer join spclty s on s.spclty=o.spclty
left outer join icd101 i on i.code=o.provision_diagnosis
left outer join ipt ip on ip.an=o.an
left outer join ward w on w.ward=ip.ward
left outer join operation_anes oa on oa.operation_id=o.operation_id
left outer join operation_anes_type ot on ot.anes_type_id=oa.anes_type_id
where o.request_date between "2009-10-01" and "2010-09-30"