469,167 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

Incorrect Syntax near the keyword 'IN'

1
Expand|Select|Wrap|Line Numbers
  1.  
  2. CREATE PROCEDURE InsertStudent(In p1 nvarchar(50),In p2 nvarchar(50),In p3 nvarchar(50),In p4 nvarchar(50))
  3.  
  4. AS
  5.  
  6. BEGIN
  7. INSERT INTO STUDENT(roll,dob,phone,address) values(p1,p2,p3,p4)
  8. END
  9.  
  10.  
May 20 '12 #1
4 2216
PsychoCoder
465 Expert Mod 256MB
I don't see the word In being used in this procedure. Are you sure it's this proc that's erroring on you?
May 21 '12 #2
Rabbit
12,516 Expert Mod 8TB
Get rid of the IN keyword in your parameter list.
May 21 '12 #3
Expand|Select|Wrap|Line Numbers
  1. CREATE PROCEDURE ProcedureName
  2. @var1 nvarchar(50),
  3. @var2 nvarchar(50)
  4. AS
  5. BEGIN
  6.     ................write insert query here................
  7. END
  8.  
May 21 '12 #4
NeoPa
32,167 Expert Mod 16PB
Procedure parameters are not declared with an "IN" keyword. You may be confusing this with the "OUT" | "OUTPUT" keyword which is sometimes used in parameter declarations. See MSDN: CREATE PROCEDURE (Transact-SQL) for the full SP.
May 21 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Jeff Magouirk | last post: by
11 posts views Thread by Mark Findlay | last post: by
2 posts views Thread by ielmrani via SQLMonster.com | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.