Pacman6000
Pacman6000

Reputation: 45

SQL Server stored procedure - Insert syntax error

I am trying to create a stored procedure to store data input from web forms to a SQL Server table. I can get the select statement for first_name to work correctly, but when I try add more Insert statements, I get a syntax error.

What am I doing wrong? Screenshot below. Thanks.

enter image description here

Upvotes: 0

Views: 915

Answers (1)

Derviş Kayımbaşıoğlu
Derviş Kayımbaşıoğlu

Reputation: 30555

remove the comma , before parantheses.

@email_email varchar(50),
                       ^^^

besides I believe that your insert statement is needed to be like

insert into dbo.users (first_name, last_name, email)
   values (@first_name, @last_name, @email_email)

Upvotes: 2

Related Questions