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 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
Can any one tell why the SQL Server 2005 behaved like this ?