problem with insert stored procedure

  • Thread starter Thread starter Rod Snyder
  • Start date Start date
R

Rod Snyder

I'm getting a syntax error on the following stored procedure and I need
another set of eyes.

It's bombing at the @SurveyNameID=SurveyNameID line

Any help would be appreciated.

CREATE PROCEDURE insAnswers


@SurveyNameID int,
@SurveyQuestionID int,
@firstName varchar (50),
@lastName varchar (50),
@email varchar(50),
@questionOneText varchar(100),
@questionOneValue int,
@questionOneComments text,
@questionTwoText varchar(100),
@questionTwoValue int,
@questionTwoComments text,
@questionThreeText varchar(100),
@questionThreeValue int,
@questionThreeComments text




AS

insert into SurveyAnswers
VALUES
(
@SurveyNameID=SurveyNameID,
@SurveyQuestionID=SurveyQuestionID,
@firstName=firstname,
@lastName=lastName,
@email=Email,
@questionOneText=QuestionOneText,
@questionOneValue=QuestionOneValue,
@questionOneComments=QuestionOneComments,
@questionTwoText=QuestionTwoText,
@questionTwoValue=QuestionTwoValue,
@questionTwoComments=QuestionTwoComments,
@questionThreeText=QuestionThreeText,
@questionThreeValue=QuestionThreeValue,
@questionThreeComments=QuestionThreeComments
)


GO
 
Try this:

insert into SurveyAnswers(
SurveyNameID,SurveyQuestionID,firstname,lastName,Email,QuestionOneText,QuestionOneValue,QuestionOneComments,QuestionTwoText,QuestionTwoValue,QuestionTwoComments,QuestionThreeText,QuestionThreeValue,QuestionThreeComments
)
VALUES
(
@SurveyNameID,
@SurveyQuestionID,
@firstName,
@lastName,
@email,
@questionOneText,
@questionOneValue,
@questionOneComments,
@questionTwoText,
@questionTwoValue,
@questionTwoComments,
@questionThreeText,
@questionThreeValue,
@questionThreeComments
)


Good Luck,
Italo
 
Back
Top