Hello All,
I am a little new to writing stored procedures...so forgive me. However, I am getting this message
Msg 156, Level 15, State 1, Procedure SP_GetandUpdateQuoteRate, Line 15
Incorrect syntax near the keyword 'LEFT'.
Msg 102, Level 15, State 1, Procedure SP_GetandUpdateQuoteRate, Line 16
Incorrect syntax near 'Routing'.
On this coded
	
	
	
		
I tried it again with this
	
	
	
		
I am still getting an error
Msg 102, Level 15, State 1, Procedure SP_UpdateRoutingRates, Line 20
Incorrect syntax near ')'.
Please Help!!
Any ideas?
 I am a little new to writing stored procedures...so forgive me. However, I am getting this message
Msg 156, Level 15, State 1, Procedure SP_GetandUpdateQuoteRate, Line 15
Incorrect syntax near the keyword 'LEFT'.
Msg 102, Level 15, State 1, Procedure SP_GetandUpdateQuoteRate, Line 16
Incorrect syntax near 'Routing'.
On this coded
		Code:
	
	
	CREATE PROCEDURE dbo.SP_GetandUpdateQuoteRate
	-- Add the parameters for the stored procedure here
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
    -- Insert statements for procedure here
	UPDATE Routing LEFT JOIN Department ON Routing.Department = Department.Department SET Routing.QuoteRate = department!rate
WHERE (((Routing.QuoteRate)=0 Or (Routing.QuoteRate) Is Null));
END
GO
	I tried it again with this
		Code:
	
	
	UPDATE    Routing
SET              QuoteRate = Department.Rate
FROM         Routing LEFT OUTER JOIN
                      Department ON Routing.Departmentid = Department.Department
WHERE     (Routing.QuoteRate IS NULL) OR
                      (Routing.QuoteRate = 0)
	I am still getting an error
Msg 102, Level 15, State 1, Procedure SP_UpdateRoutingRates, Line 20
Incorrect syntax near ')'.
Please Help!!
Any ideas?
			
				Last edited: