问题描述
我的查询如下
选择First.course,second.Certificate_No,second.Issue_Authority,second.Issue_Date
来自
(选择不同的Course = case cr.cpm_pkg_id WHEN''那么cr.cmn_minor_code else cbm.cmn_minor_code end
来自course_registration cr,batch_course_registration bcr,co_batch_master cbm其中
bcr.cr_bill_no = cr.cr_bill_no和cbm.cbm_batch_id = bcr.bcr_batch_id和cr.cr_active ='A'和
cr.stud_id = 425)作为第一个
left join
(选择不同的b.courseelg,b.coursename,a.pm_prof_code作为Code,a.sp_cert_no作为Certificate_No,
a.sp_issu_authority作为Issue_Authority,convert( char(14),a.sp_issu_dt,106)作为来自student_professional的Issue_Date a,tb_courseelg_settings b
其中a.pm_prof_code = b.courseelg和first.course = b.coursename和a.stud_id = 425)作为第二个
ON(second.coursename = first.Course)
当我运行a bove查询显示错误如下
多部分标识符first.course无法绑定。
从我的查询是什么我犯的错误。
My query as follows
select First.course,second.Certificate_No,second.Issue_Authority,second.Issue_Date
from
(select distinct Course = case cr.cpm_pkg_id WHEN '' THEN cr.cmn_minor_code else cbm.cmn_minor_code end
from course_registration cr, batch_course_registration bcr, co_batch_master cbm where
bcr.cr_bill_no = cr.cr_bill_no and cbm.cbm_batch_id = bcr.bcr_batch_id and cr.cr_active = 'A' and
cr.stud_id = 425) as first
left join
(select distinct b.courseelg,b.coursename,a.pm_prof_code as Code,a.sp_cert_no as Certificate_No,
a.sp_issu_authority as Issue_Authority, convert(char(14),a.sp_issu_dt,106) as Issue_Date from student_professional a,tb_courseelg_settings b
where a.pm_prof_code= b.courseelg and first.course = b.coursename and a.stud_id = 425) as second
ON(second.coursename=first.Course)
When i run the above query shows error as follows
The multi-part identifier "first.course" could not be bound.
From my query what is the mistake i made.
推荐答案
这篇关于当我运行查询时显示错误多部分标识符“First.Course”无法绑定。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!