Line 55: Incorrect syntax near '@tempString'.
Here is the codeset @addZero = '0' -- Setup Cursor variables declare @c_RoomName varchar(30) declare @c_Length int declare @c_DeptID int declare @c_RoomID int declare @c_StartTime int declare @c_EndTime int -- Loop Through the Cursor while (@tiRoomCtr <= @tiRooms) Begin fetch avail_Rooms into @c_RoomName,@c_Length,@c_DeptID,@c_roomID,@c_StartTime,@c_EndTime set @tiRoomCtr = @tiRoomCtr+1 set @tempstring = cast(@c_StartTime as varchar(5)) if len(@tempString) = 3 BEGIN @tempString=@addZero + @tempString END print @tempstring ENDAnybody know why?