sql server 多次为 'b' 指定了列 'patientid'。
withpas(selectpp.*,s.sectionidfromtb_patientpp,tb_section_flagswherepp.patientid=s.pa...
with p as(
select pp.*,s.sectionid
from
tb_patient pp,tb_section_flag s
where pp.patientid=s.patientid and Status='I' and siteid not in('SI0000000554485','SI0000003221423','SIHCSLCS5E945TZ',
'SIHE7UJ13VVXNO0','SIHE9JS19E2GQEW')
) select b.*,QUGO32DSIWNBYOK,QUGO32E85K311F2,QUGO32E85K311F3,QUGO32E85K311FJ,QUGO32EZFRZZCLA,QUGO32F70ENHQRR,QUGO32FE1R6TMK5,updatetime,QUGO32PA77QG0GG,QUGO32Q9S81FU6G,QUGQ from (select *,ROW_NUMBER() over(order by p.PatientId) AS RowNumber from p left join SSGO31S90AHTPRK on p.patientid =SSGO31S90AHTPRK.patientid left join SSGQ1OGK9VYM3V3 on p.patientid =SSGQ1OGK9VYM3V3.patientid where sectionid = 'SEGO31QECEHQMRZ') as b where b.RowNumber Between (1) and (100) order by rownumber
麻烦各位大侠帮忙看看哪儿出问题 展开
select pp.*,s.sectionid
from
tb_patient pp,tb_section_flag s
where pp.patientid=s.patientid and Status='I' and siteid not in('SI0000000554485','SI0000003221423','SIHCSLCS5E945TZ',
'SIHE7UJ13VVXNO0','SIHE9JS19E2GQEW')
) select b.*,QUGO32DSIWNBYOK,QUGO32E85K311F2,QUGO32E85K311F3,QUGO32E85K311FJ,QUGO32EZFRZZCLA,QUGO32F70ENHQRR,QUGO32FE1R6TMK5,updatetime,QUGO32PA77QG0GG,QUGO32Q9S81FU6G,QUGQ from (select *,ROW_NUMBER() over(order by p.PatientId) AS RowNumber from p left join SSGO31S90AHTPRK on p.patientid =SSGO31S90AHTPRK.patientid left join SSGQ1OGK9VYM3V3 on p.patientid =SSGQ1OGK9VYM3V3.patientid where sectionid = 'SEGO31QECEHQMRZ') as b where b.RowNumber Between (1) and (100) order by rownumber
麻烦各位大侠帮忙看看哪儿出问题 展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询