kireeyd 发表于 2007-5-11 22:26

关于数据窗口的问题[急]

..<BR>数据窗口 SELECT TABLE后 选择列...我自己自定义了一个列 具体如下<BR>//**** <BR>SELECT  mz_reginfo_v.mz_visit_no,   <BR>         mz_reginfo_v.mz_name,   <BR>         mz_reginfo_v.mz_sex,   <BR>         mz_reginfo_v.mz_age,   <BR>         mz_reginfo_v.patient_type_name,   <BR>         mz_reginfo_v.mz_reg_price,   <BR>         mz_reginfo_v.mz_date,   <BR>         mz_reginfo_v.mz_fact_pay,   <BR>         mz_reginfo_v.czyname,  <BR>         (mz_reginfo_v.mz_reg_price - mz_reginfo_v.mz_reg_price *(select patient_type_dict.desc_xr * 10 /100 as tt from patient_type_dict where mz_reginfo_v.patient_type_name = patient_type_dict.patient_type_name))as price<BR>    FROM mz_reginfo_v , <BR>         patient_type_dict<BR>   WHERE mz_reginfo_v.mz_zf_flag = 0              <BR>ORDER BY mz_reginfo_v.mz_visit_no ASC   ;<BR>//***<BR>问题主要出在 <BR>(mz_reginfo_v.mz_reg_price - mz_reginfo_v.mz_reg_price *(select patient_type_dict.desc_xr * 10 /100 as tt from patient_type_dict where mz_reginfo_v.patient_type_name = patient_type_dict.patient_type_name))as price<BR>这个列中..他在SQL中能执行 可是在PB中老报错.但是能执行...<BR>如果我把那列删了..也可以传递参数..可是加了那列后 是能执行 可是参数不能传递<BR>....求高手解决是咋回事..<BR><BR>在DATAWINDOW中 加个函数列和SQL中不一样么 ?

路過 发表于 2007-5-14 12:54

加上一個 mz_reginfo_v <BR>mz_reginfo_v.mz_reg_price - mz_reginfo_v.mz_reg_price *<BR>(select patient_type_dict.desc_xr * 10 /100 as tt from patient_type_dict<FONT color=#f73809>,mz_reginfo_v </FONT><FONT color=#000000>where</FONT> mz_reginfo_v.patient_type_name = patient_type_dict.patient_type_name))as price<BR>感覺寫的太複雜啦,這樣寫不否能滿足你的要求啦<BR>SELECT  mz_reginfo_v.mz_visit_no,   <BR>         mz_reginfo_v.mz_name,   <BR>         mz_reginfo_v.mz_sex,   <BR>         mz_reginfo_v.mz_age,   <BR>         mz_reginfo_v.patient_type_name,   <BR>         mz_reginfo_v.mz_reg_price,   <BR>         mz_reginfo_v.mz_date,   <BR>         mz_reginfo_v.mz_fact_pay,   <BR>         mz_reginfo_v.czyname,  <BR>         (mz_reginfo_v.mz_reg_price - mz_reginfo_v.mz_reg_price * patient_type_dict.desc_xr * 10 /100)as price<BR>    FROM mz_reginfo_v , <BR>         patient_type_dict<BR>   WHERE mz_reginfo_v.patient_type_name = patient_type_dict.patient_type_name and <BR>         mz_reginfo_v.mz_zf_flag = 0              <BR>ORDER BY mz_reginfo_v.mz_visit_no ASC   ;<BR>

页: [1]

编程论坛