表达式“in”中的多个参数出错

时间:2014-04-25 11:39:56

标签: crystal-reports report

Crystal Reports XI 我有这个包含两个参数的脚本 - {Location Name}和{Provider}

    insert @pat_tracking(person_id, last_name, first_name, dob, 
    mrn, enc_id, enc_nbr, enc_timestamp, enc_date, 
    provider, attending_ind, location, time1)
select distinct p.person_id, p.last_name, p.first_name, CONVERT(date, p.date_of_birth, 112), 
    convert(int, pa.med_rec_nbr), pe.enc_id, pe.enc_nbr, pe.create_timestamp, CONVERT(date, pe.create_timestamp), 
    pm.description, ppm.attending_ind, lm.location_name, convert(datetime, CONVERT(time, pe.create_timestamp))
from person p
    join patient_encounter pe on p.person_id=pe.person_id
    join patient pa on p.person_id=pa.person_id and pe.practice_id=pa.practice_id
    join provider_mstr pm on pe.rendering_provider_id=pm.provider_id
    join provider_practice_mstr ppm on pe.practice_id=ppm.practice_id and pm.provider_id=ppm.provider_id
    join location_mstr lm on pe.location_id=lm.location_id
    join pat_apt_status_hx_ pash on pe.enc_id=pash.enc_id
where
 lm.location_name in {?Location Name}
and  convert(varchar(36), pe.rendering_provider_id) in {?Provider}

但是,当我保存这个 - 我得到错误: "无法从数据库中检索数据...语法错误。" 这些参数包含多项选择 - 一项或多项。 我该怎么做才能解决这个错误? 感谢所有和最好的问候

1 个答案:

答案 0 :(得分:0)

是。谢谢大家的参与 - 错误CR的问题。新版本的СR - 不是问题