Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Need help with very simple stored procedure.  Syntax error with ) as the error.  Not sure where to put it.

Posted on 2008-11-06
2
Medium Priority
?
239 Views
Last Modified: 2012-05-05
I am trying to create a procedure that updates a table with a single record in it.  This record serves nothing more than as a counter.  I am getting a syntax error of ) and am not sure what I am missing.  Can some one point me in the right direction?

Here is my code:

USE [12344]
GO
/****** Object:  StoredProcedure [dbo].[WritePHIVerCounter]    Script Date: 11/06/2008 22:48:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Proc [dbo].[WritePHIVerCounter]
@ID decimal


AS
BEGIN
SET NOCOUNT ON

UPDATE [DRRPHI] (ID)

VALUES                @ID


SET NOCOUNT OFF
End
0
Comment
Question by:kwh3856
2 Comments
 
LVL 17

Accepted Solution

by:
HuyBD earned 2000 total points
ID: 22902009
try this
USE [12344]
GO
/****** Object:  StoredProcedure [dbo].[WritePHIVerCounter]    Script Date: 11/06/2008 22:48:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE Proc [dbo].[WritePHIVerCounter]
@ID decimal
 
 
AS
BEGIN
SET NOCOUNT ON
 
UPDATE [DRRPHI] SET ID=@ID
 
 
SET NOCOUNT OFF
End

Open in new window

0
 

Author Closing Comment

by:kwh3856
ID: 31514244
Thank you very much.  You were right on.

Thanks
Kenny
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question