>First, there's garbage at the end of your sproc. Second, double click on the error message and QA will bring you to the line with error.
Why SELECT @CartID = @@SCOPE_IDENTITY gives
Server: Msg 137, Level 15, State 2, Procedure sp_InsertShoppingCartInfo, Line 60
Must declare the variable '@@SCOPE_IDENTITY'.
My variable is declared at the top with DECLARE @CartID int
If it's not broken, fix it until it is.
My Blog