当我运行上面的查询显示错误如下 [英] When I Run The Above Query Shows Error As Follows

查看:86
本文介绍了当我运行上面的查询显示错误如下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select distinct 
	Course = case cr.cpm_pkg_id WHEN '' THEN cr.cmn_minor_code else  cbm.cmn_minor_code end,
	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,
	b.Courseelg as Cousrseelg
from 
	course_registration cr, 
	batch_course_registration bcr, 
	co_batch_master cbm,
	student_professional a,
	tb_courseelg_settings b
	left join course_registration  on course_registration.cmn_minor_code = tb_courseelg_settings.courseelg
where 
	bcr.cr_bill_no = cr.cr_bill_no 
	and cbm.cbm_batch_id = bcr.bcr_batch_id 
	and cr.cr_active = 'A' 
	and a.pm_prof_code= b.courseelg 
	and b.coursename = cr.cmn_minor_code  
	and a.stud_id '9917'



当我运行上述查询时,显示错误如下

多部分标识符tb_courseelg_settings.courseelg无法绑定。

来自上面的查询是什么我犯的错误。



问候,

Narasiman P.


When i run the above query shows error as follows
The multi-part identifier "tb_courseelg_settings.courseelg" could not be bound.
from the above query what is the mistake i made.

Regards,
Narasiman P.

推荐答案

在这一行
tb_courseelg_settings b

你告诉SQL tb_courseelg_settings 将被称为 b ,所以使用 b 而不是长名称!

you told SQL that tb_courseelg_settings will be called b, so use b instead of the long name!


您正在混合显式和隐式 JOIN的。你需要仔细做。请参阅 - 无法绑定多部分标识符 [ ^ ]。
You are mixing the explicit and implicit JOINs. You need to do it carefully. Refer - The multi-part identifier could not be bound[^].


这篇关于当我运行上面的查询显示错误如下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆