rickjamesb
MIS
Im basically designing a VB program that takes user inputs to add a new row to an "Employees" table. My procedure in SQL is giving me trouble though, and i don't know why.
Server: Msg 156, Level 15, State 1, Procedure up_New_Employee, Line 20
Incorrect syntax near the keyword 'INSERT'.
Any ideas on what could be wrong? This is my first time trying an INSERT INTO statement.
Code:
CREATE PROCEDURE up_New_Employee
@LastName nvarchar(20),
@FirstName nvarchar(10),
@Title nvarchar(30),
@TitleOfCourtesy nvarchar(25),
@BirthDate datetime,
@HireDate datetime,
@Address nvarchar(60),
@City nvarchar(15),
@Region nvarchar(15),
@PostalCode nvarchar(10),
@Country nvarchar(15),
@HomePhone nvarchar(24),
@Extension nvarchar(4),
@Notes ntext(16),
@ReportsTo int
AS
DECLARE @EmployeeID int,
INSERT INTO Employees (EmployeeID, LastName, FirstName,
Title, TitleOfCourtesy, BirthDate, HireDate, Address,
City, Region, PostalCode, Country, HomePhone, Extension,
Notes, ReportsTo)
VALUES ( @EmployeeID, @LastName, @FirstName, @Title,
@TitleOfCourtesy, @BirthDate, @HireDate, @Address,
@City, @Region, @PostalCode, @Country, @HomePhone,
@Extension, @Notes, @ReportsTo)
Server: Msg 156, Level 15, State 1, Procedure up_New_Employee, Line 20
Incorrect syntax near the keyword 'INSERT'.
Any ideas on what could be wrong? This is my first time trying an INSERT INTO statement.