Please Help with Transaction + Alter Procedure statement
From: Roger James Jr (robin.marshall_at_gmail.com)
Date: 10/01/04
- Next message: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Previous message: Thomas Phaneuf: "SQL Server 2000 MSDE and XP sp2 problem"
- Next in thread: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Reply: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Messages sorted by: [ date ] [ thread ]
Date: 30 Sep 2004 18:17:48 -0700
Hi,
I am struggling with the following SQL. Can anyone help me please.
What is the problem?
Errors:
Server: Msg 156, Level 15, State 1, Line 6
Incorrect syntax near the keyword 'PROCEDURE'.
Server: Msg 137, Level 15, State 1, Line 14
Must declare the variable '@mySomething'.
BEGIN TRANSACTION myTransaction
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id =
object_id(N'[mytable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
ALTER PROCEDURE myProcedure
(
@myID INT,
@mySomething VARCHAR(255)
)
AS
SELECT
@mySomething + myFieldValue AS myDesiredResult
FROM
myTable
END
COMMIT TRANSACTION myTransaction
- Next message: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Previous message: Thomas Phaneuf: "SQL Server 2000 MSDE and XP sp2 problem"
- Next in thread: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Reply: David Portas: "Re: Please Help with Transaction + Alter Procedure statement"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|