Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error in Stored procedure.

Author  Topic 

macca
Posting Yak Master

146 Posts

Posted - 2005-10-13 : 07:07:18
I keep getting this error message "Line 15: Incorrect syntax near ')'" in the following stored procedure. Can anyone see anything wrong with it. The table is called licence.

macca

CREATE PROCEDURE sproc_AddLicence
(
@RegNo int,
@LicenseeName char(50),
@LicenseeAddress char(50),
@TelNo varchar(20),
@StorageID int
)

AS

BEGIN
INSERT INTO Licence(RegNo,LicenseeName,LicenseeAddress,TelNo,StorageID)

VALUES(@RegNo,@LicenseeName,@LicenseeAddress,@TelNo,@StorageID)

GO

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-13 : 07:20:14
You forget to use END
Use END before Go

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-10-13 : 08:33:42
You also do NOT have to use the ( or ) around the parameters at the top.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-13 : 08:51:25
quote:
Originally posted by AndrewMurphy

You also do NOT have to use the ( or ) around the parameters at the top.


But there is nothing wrong with that.
I see many SQL Programmers use that in order to seperate parameter lists from rest of the coding

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

macca
Posting Yak Master

146 Posts

Posted - 2005-10-13 : 08:59:30
Thanks for the help Madhivnan.

macca
Go to Top of Page
   

- Advertisement -