Click here to Skip to main content
15,908,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.)

SQL
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 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.
SQL
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.
SQL
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


Can any one tell why the SQL Server 2005 behaved like this ?
Posted
Updated 23-Dec-10 2:33am
v2

Check to see if there are any Synonyms set up for Conference_SpaceTemp.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 23-Dec-10 10:04am    
That's what I was thinking about also. 5+
in some cases this will happen just restart u r Sql Server Management Studio and try again
 
Share this answer
 
Comments
RDBurmon 23-Dec-10 8:24am    
Same case after restarting the SQL server , Restarting the PC, I have also clean catch memory ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900