BMS-HOSxP Community
HOSxP => การเขียน SQL Script => ข้อความที่เริ่มโดย: sunya ที่ มิถุนายน 02, 2010, 09:36:36 AM
-
ขอ sql ที่เอาข้อมูล ส่วนสูง(height) ในตาราง Patient มาใส่ใน ส่วนสูง(height) ในตาราง opdscreen
- patient.height ไม่เท่ากับ 0
- opdscreen.height = 0 หรือ ค่าว่าง
- update ข้อมูลในปี 2552(1 มค.52-31 ธ.ค.52)
-
update opdscreen o inner join paitent p on p.hn=o.hn set o.height=p.height where (o.height=0 or o.height is null ) and (p.height>0) and (vstdate between "2009-01-01" and "2009-12-31")