ดูข้อมูล นค.1
select v.* from vn_stat v
left outer join ovst o on o.vn = v.vn
where v.pttype in (’03’)
and v.vstdate between ‘2013-06-01’ and ‘2013-06-30′ and v.hospmain=’10917′ and o.an is null
order by v.vn
select v.* from vn_stat v
left outer join ovst o on o.vn = v.vn
where v.pttype in (’03’)
and v.vstdate between ‘2013-06-01’ and ‘2013-06-30’ and v.hospmain not in(‘10917′) and o.an is null
order by v.vn
select concat(pt.pname,pt.fname,’ ‘,pt.lname)as name,o.*,v.*
from vn_stat v
left outer join ovst o on o.vn = v.vn
left outer join patient pt on o.hn=pt.hn
where v.pttype in (’06’,’07’,’14’,’16’,’18’,’21’,’23’,’27’,’29’,’31’,’33’,’40’,’44’,’45’,’46’,’48’,’51’,’53’,’55’,’57’,’59’,’61’,’64’,’66’,’69’,’70’,’72’,’90’)
and v.vstdate between ‘2013-06-01’ and ‘2013-06-30’
and v.hospmain in (‘10668′,’22302′,’11494′,’10915′,’10916′,’10918′,’10919′,’10920′,’10921′,’10922′,’10923′,’10924′,’10925′,’10926’)
and o.an is null
ใส่ความเห็น
คุณต้องเข้าสู่ระบบ เพื่อจะพิมพ์ความเห็น