MSSQL Procedure issue
I have written the following procedure and I can't get it to save as Visual Studio keeps telling me that 'there's an error near '('', which isn't very helpful...
Any ideas why this is happening? It is supposed to try and update a row, if it doesn't exist then insert it instead (it is a more efficient way than running a select command then running an update or an insert command, as it only calls indexes once).
Any help would be appreciated
CREATE PROCEDURE dbo.InsertPupil
INSERT INTO People (FirstName, LastName, AdmissionNumber, FreeMeals, Photo, TypeID)
Don't mind me. The answer was very simple... There shouldn't be any parentheses around the data after SET in the UPDATE command.