Microsoft KB Archive/279083

= BUG: Books Online Example Stored Procedure Sp_SetMark =

Article ID: 279083

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q279083



BUG #: 235795 (SHILOH_BUGS)



SYMPTOMS
In the Microsoft SQL Server 2000 Books Online &quot;Administrator's Companion&quot;, the &quot;Backup and Restore Operations&quot; topic has a subsection titled &quot;Backup and Recovery of Related Databases&quot; that contains an error in one of the T-SQL examples. The example is as follows: CREATE PROCEDURE sp_SetMark @name nvarchar (128) AS BEGIN TRANSACTION @name WITH MARK UPDATE coyote.dbo.Marks SET on = 1 COMMIT TRANSACTION GO If you run this code, you may receive the following error message: Server: Msg 156, Level 15, State 1, Line 5 Incorrect syntax near the keyword 'on'.



CAUSE
The example code for creating the sp_SetMark stored procedure has a syntax error due to the reserved keyword &quot;ON&quot;.



WORKAROUND
Rewrite the stored procedure code as follows: CREATE PROCEDURE sp_SetMark @name nvarchar (128) AS BEGIN TRANSACTION @name WITH MARK UPDATE coyote.dbo.Marks SET one = 1 COMMIT TRANSACTION GO



STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.

Keywords: kbbug kbpending KB279083

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.