W
woodyou
Unregistered / Unconfirmed
GUEST, unregistred user!
患者信息表(patients)列名 数据类型 长度 pat_id char 20 instru_myid char 4 chara_myid char 4 workroom_myid char 4 Sex_myID char 2 year_myID char 2 state_myid char 4 项目结果类别信息表(vatypes)列名 数据类型 长度vatype_myid char 4vatype_id char 3vatype_name char 20vatype_rule char 20方法信息表(methods)列名 数据类型 长度method_myid char 4method_id char 4method_name char 20项目信息表(items)列名 数据类型 长度itm_myid char 4itm_id char 4itm_Eng char 20itm_Chan char 20itm_print char 4itm_hl7 char 20itm _dec char 1vatype_myid char 4参考值信息表(ranges)列名 数据类型 长度 range_id char 7 range_myid char 7 range_ageup real 4 range_agelow real 4 range_up char 20 range_low char 20 range_val char 20 sex_myid char 2 method_myid char 4 sample_myid char 4 itm_myid char 4 unit_myid char 4 instru_myid char 4 以上几个表查询,以下查询语句是否准确,我感觉效率不太高select * from(select * from(select * from(select * from itmvals left jion items on itmvals.itm_myid=items.itm_myid) Tb_1 left join ranges on Tb_1.range_myid=ranges.range_myid and b_1.method_myid=ranges.method_myid) Tb_2 left jion units on Tb_2.unit_myid=units.unit_myid) Tb_3 where Tb_3.Pat_id=:myPat_id and Tb_3.sex_myid=:SexmyID and Tb_3.instru_myid=:instrumyid Tb_3.range_up<=:mypattage and Tb_3.range_agelow>=:mypattage and method_myid=:mymethodmyid