Sql Server存储过程没有给出错误!!!!!!!!!!!! [英] Sql Server Stored Procedure not gave error!!!!!!!!!!!!

查看:145
本文介绍了Sql Server存储过程没有给出错误!!!!!!!!!!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在下面的过程中,我的数据库中不存在联合表(Conference_SpaceTemp),但表的实际名称是Conference_Spaces

另请查看列{Space.Office}

但是当我执行这个存储过程时它给了我消息

(命令已成功完成。)



In below Procedure the joint table (Conference_SpaceTemp) does not exist in my database but the actual name of table is Conference_Spaces
Also look at the column {Space.Office}
But when i executed this Stored Procedure it gave me message as
(Command(s) completed successfully.)

DROP PROC GetConfData
GO
CREATE PROC GetConfData
AS 
BEGIN
SELECT Conference.StartUTC,ConferenceSpace.Name,Space.Office
FROM Conference Conference Inner Join Conference_SpaceTemp ConferenceSpace ON Conference.Confirmationnumber=ConferenceSpace.Conferenceid
END





then我已将Conference_SpaceTemp更改为Conference_Spaces

以下是我更新的SP。

现在这给了我错误

消息207,等级16,状态1,程序GetConfData,第4行

无效的列名''名称''。

消息4104,级别16,状态1,过程GetConfData,第4行

无法绑定多部分标识符Space.Office。



then I have changed Conference_SpaceTemp to Conference_Spaces
below is my updated SP.
Now this gave me error
Msg 207, Level 16, State 1, Procedure GetConfData, Line 4
Invalid column name ''Name''.
Msg 4104, Level 16, State 1, Procedure GetConfData, Line 4
The multi-part identifier "Space.Office" could not be bound.

DROP PROC GetConfData
GO
CREATE PROC GetConfData
AS 
BEGIN
SELECT Conference.StartUTC,ConferenceSpace.Name,Space.Office
FROM Conference Conference Inner Join Conference_Spaces ConferenceSpace ON Conference.Confirmationnumber=ConferenceSpace.Conferenceid
END



我再次恢复了更改

然后它成功执行。


I again reverted back the changes
Then it executed successfully.

DROP PROC GetConfData
GO
CREATE PROC GetConfData
AS 
BEGIN
SELECT Conference.StartUTC,ConferenceSpace.Name,Space.Office
FROM Conference Conference Inner Join Conference_SpaceTemp ConferenceSpace ON Conference.Confirmationnumber=ConferenceSpace.Conferenceid
END





任何人都可以说出为什么SQL Server 2005的行为如此?



Can any one tell why the SQL Server 2005 behaved like this ?

推荐答案

检查是否有任何为Conference_SpaceTemp设置的同义词。
Check to see if there are any Synonyms set up for Conference_SpaceTemp.


在某些情况下,只需重新启动您的Sql Server Management Studio并重试
in some cases this will happen just restart u r Sql Server Management Studio and try again


这篇关于Sql Server存储过程没有给出错误!!!!!!!!!!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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