set @cHN='';
select if(@cHN<>lh.hn,lh.hn,'') HN,@cHN:=lh.hn CheckHN,l.lab_items_name
,lo.lab_order_result,lh.order_department
from lab_head lh
left join lab_order lo on lo.lab_order_number = lh.lab_order_number
left join lab_items l on l.lab_items_code = lo.lab_items_code
where lh.order_date='2013-12-11'
and lh.order_department=001
order by lh.hn
*****
เปลี่ยน deparment เอานะคับ