BMS-HOSxP Community
HOSxP => นอกเรื่อง => ข้อความที่เริ่มโดย: panus_t ที่ สิงหาคม 01, 2013, 12:10:54 PM
-
ถามเรื่อง unitcost Rawdate
ตาราง TableOfPatient
ฟิลด์ hosmain , mainhosrightid , mainhosid ดึงมาจากตรงไหนของ hosxp ครับ
-
;) จากประสบการณ์จริง แนะนำให้ ส่งเป็น Data ธรรมดาได้คะแนนดีกว่าครับ
-
SELECT '10823' AS `HosMain`,`patient`.`hn` AS `hn`,`patient`.`cid` AS `cid`,`patient`.`pname` AS `pname`,
`patient`.`fname` AS `fname`,`patient`.`lname` AS `lname`,`patient`.`birthday` AS `birthday`,`patient`.`sex` AS `sex`,
`pttypehistory`.`hospmain` AS `MainHosRightID`,`hospcode`.`name` AS `MainHosID`
FROM ((`patient` LEFT JOIN `pttypehistory` ON((`pttypehistory`.`hn` = `patient`.`hn`))) LEFT JOIN `hospcode` ON((`hospcode`.`hospcode` = `pttypehistory`.`hospmain`)))
อันนี้เป็นคำสั่งดึง TableOfPatient ที่ได้มาจากการประชุม ลองดูแล้วกันครับ
-
;) จากประสบการณ์จริง แนะนำให้ ส่งเป็น Data ธรรมดาได้คะแนนดีกว่าครับ
นั่งยัน นอนยัน ตามนี้เลยครับ
-
SELECT '10823' AS `HosMain`,`patient`.`hn` AS `hn`,`patient`.`cid` AS `cid`,`patient`.`pname` AS `pname`,
`patient`.`fname` AS `fname`,`patient`.`lname` AS `lname`,`patient`.`birthday` AS `birthday`,`patient`.`sex` AS `sex`,
`pttypehistory`.`hospmain` AS `MainHosRightID`,`hospcode`.`name` AS `MainHosID`
FROM ((`patient` LEFT JOIN `pttypehistory` ON((`pttypehistory`.`hn` = `patient`.`hn`))) LEFT JOIN `hospcode` ON((`hospcode`.`hospcode` = `pttypehistory`.`hospmain`)))
อันนี้เป็นคำสั่งดึง TableOfPatient ที่ได้มาจากการประชุม ลองดูแล้วกันครับ
รบกวนนิดหนึ่งครับ
พอจะมี sql สำหรับเพิ่มข้อมูลในตารางใน data หรือ rawdata ไหมครับ