ljhodgett
asked on
error in syntax of stored procedure in mssql server 2005
Hi,
I have the following code in a stored procedure: -
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- ========================== ========== =========
-- Author: LH
-- Create date: 02/08/02007
-- Description: Insert where used information into "dbo."
-- ========================== ========== =========
ALTER procedure [dbo].[Where_Used](
@ProdID varchar(100),
@RigID varchar(100))
AS
BEGIN
SET NOCOUNT ON
insert into dbo.Where_Used values(@Prodid, @RigID)
END
but it comes up: -
Msg 2010, Level 16, State 1, Procedure Where_Used, Line 12
Cannot perform alter on 'dbo.Where_Used' because it is an incompatible object type.
How do I resolve this please.
Many Thanks
Lee
I have the following code in a stored procedure: -
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- ==========================
-- Author: LH
-- Create date: 02/08/02007
-- Description: Insert where used information into "dbo."
-- ==========================
ALTER procedure [dbo].[Where_Used](
@ProdID varchar(100),
@RigID varchar(100))
AS
BEGIN
SET NOCOUNT ON
insert into dbo.Where_Used values(@Prodid, @RigID)
END
but it comes up: -
Msg 2010, Level 16, State 1, Procedure Where_Used, Line 12
Cannot perform alter on 'dbo.Where_Used' because it is an incompatible object type.
How do I resolve this please.
Many Thanks
Lee
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
No Joy i'm afraid. I've tried: -
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- ========================== ========== =========
-- Author: LH
-- Create date: 02/08/02007
-- Description: Insert where used information into "dbo."
-- ========================== ========== =========
ALTER procedure [dbo].[Where_Used](
@ProdID varchar(100),
@RigID varchar(100))
AS
BEGIN
SET NOCOUNT ON
insert into dbo.Where_Used(ProductID, RigID) values (@Prodid, @RigID)
END
it says line 12 which is the "AS" part of the stored procedure.
Best Regards
Lee
No Joy i'm afraid. I've tried: -
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- ==========================
-- Author: LH
-- Create date: 02/08/02007
-- Description: Insert where used information into "dbo."
-- ==========================
ALTER procedure [dbo].[Where_Used](
@ProdID varchar(100),
@RigID varchar(100))
AS
BEGIN
SET NOCOUNT ON
insert into dbo.Where_Used(ProductID, RigID) values (@Prodid, @RigID)
END
it says line 12 which is the "AS" part of the stored procedure.
Best Regards
Lee
I assume you have tried ziolko's suggestion, but not mine yet...
ooops missed that name conflict
ziolko.
ziolko.
insert into dbo.Where_Used(your_field_
ziolko.