BMS-HOSxP Community
HOSxP => แจ้งข้อผิดพลาดการทำงานของ HOSxP V3 => ข้อความที่เริ่มโดย: siemens ที่ มีนาคม 23, 2010, 09:23:17 AM
-
รบกวนช่วยดู code ที่ผมแก้ไขจาก code อื่น(ที่ก้อบมาจากใน hosxp broad นี้เองครับ) exec แล้วข้อมูลไม่ยอม update
update person INNER JOIN person ON patient.fname = person.fname AND patient.lname = person.lname AND patient.sex = person.sex AND patient.birthday = person.birthdate
set person.cid=(select patient.cid from patient where patient.fname = person.fname AND patient.lname = person.lname ANDpatient.sex = person.sex AND patient.birthday = person.birthdate)
WHERE patient.cid IS NOT NULL AND person.cid IS NULL
ขอบคุณล่วงหน้าครับ................. ;D
-
update person INNER JOIN patient ON patient.fname = person.fname AND patient.lname = person.lname AND patient.sex = person.sex AND patient.birthday = person.birthdate
set person.cid=(select patient.cid from patient where patient.fname = person.fname AND patient.lname = person.lname ANDpatient.sex = person.sex AND patient.birthday = person.birthdate)
WHERE patient.cid IS NOT NULL AND person.cid IS NULL
-
ขอบคุณครับ...................... ;D ลองรันแล้วใน slave ข้อมูลยังไม่มา แต่ผมลองทานข้อมูลพื้นฐานจาก patient / person ของโรงพยาบาลผมมันมี error ตรงข้อมูลซ้ำซ้อนด้วยครับ คงต้องแก้ไขตรงนี้ก่อนครับ............ :(