473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 2399
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,556 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

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

Similar topics

1
by: Jeff Magouirk | last post by:
Dear Group, I am trying to create a view and keep getting the Incorrect syntax near the keyword 'Declare'" error. Here is the code I am writing. Create view fixed_airs (sid, fad_a2, fad_a3)...
11
by: Mark Findlay | last post by:
Hello Experts! I am attempting to use the OleDbCommand.ExecuteScaler() function within my ASP.NET C# web page to perform a simple validation, but receive the following error: "Incorrect...
2
by: JMUApache | last post by:
Hi, I have got a error message while I run a sample OLEDB program. It says "Incorrect Syntax Near The Keyword Default Information". platform: Windows XP + Visual Studio 2005 Beta 2 + SQL...
2
by: Jon | last post by:
hi, i was trying to create a DB in a SQL Server. but when i try to connect it with : Dim conn As SqlConnection = New SqlConnection("Initial Catalog=master; " & _ "Data Source=SERVER-MACHINE;" &...
2
by: ielmrani via SQLMonster.com | last post by:
Hi Everyone, I really tried to not post this question but I gave up. I tried brackets, parenth...etc but nothing worked. I get this error message: Incorrect syntax near the keyword 'THEN'. ...
3
by: wallic | last post by:
Hello, This is my first post and I am a beginner with SQL code. The code below is supposed to update a new table (loctable) with a calculated value based on the original table (hra_data). ...
3
by: Skillman | last post by:
Hi Everybody, I'm beginer in SQL and was wonder if anybody could take a look at this and help me. I got this error, and not sure how to fix it. This is the error: Msg 156, Level 15, State 1, Line...
10
by: arial | last post by:
Hi, I am getting this error message: Incorrect syntax near the keyword 'where'. Description: An unhandled exception occurred during the execution of the current web request. Please review...
1
by: karenkksh | last post by:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
2
by: mahendra dubey | last post by:
I have SQl Server 2005 SP1.I am running following query ALTER USER WITH LOGIN = I have created both user and login with name myuser. but this query returns error Msg 102, Level 15, State 1,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.