ลองแบบนี้ดูนะครับ ถ้าต้องการ xn ที่พิมพ์ติดซอง
select r.xn,x.*,concat(p.pname,p.fname,' ',p.lname) as ptname ,r.xn as real_xn,i.xray_items_name,
v.age_y,xh.doctor_list,xh.department,d.name as doctor, w.name as ward ,pr.main_regiment ,pr.sub_regiment
from xray_report x
left outer join xray_items i on i.xray_items_code=x.xray_items_code
left outer join vn_stat v on v.vn=x.vn
left outer join an_stat a on v.vn=a.vn
left outer join ward w on a.ward=w.ward
left outer join xray_head xh on v.vn=xh.vn
left outer join doctor d on x.doctor=d.code
left outer join patient p on p.hn=x.hn
left outer join patient_regiment pr on p.hn=pr.hn
left outer join xrayxn r on r.hn=x.hn
where r.xn='225'