问题描述
selectc.projectid,c.zonename,c.projectnamec,c.biddatefrom(selectb.projectid,b.zonename,b.projectnamec,b.biddate,b.jkycjfrom((selectzoneid,projectid,zonename,projectnamec,biddate,namec,medicinemodel,outlookc,JkycjfromData_Centerwhere1=1andjkycj='金诃藏药药业股份有限公司')asbinnerjoin(selectzoneid,projectid,zonename,projectnamec,biddate,namec,medicinemodel,outlookc,Jkycjfromdata_center)asaona.namec=b.namecanda.medicinemodel=b.medicinemodelanda.outlookc=b.outlookc)where1=1andb.BidDate>='2010-09-01'andb.BidDate<='2011/12/9')cgroupbyc.projectid,c.zonename,c.projectnamec,c.biddateorderbyc.biddatedesc,c.projectid,c.zonename,c.projectnamec
解决方案
解决方案二:
把中间两个表的内连接直接去掉就用逗号分开,在写条件查询还有为啥要加这么多别名,别名很容易出现这个问题
时间: 2024-11-08 22:25:27