hi all
i am a beginner, i have written an insert stored procedure.
i need my SP to check for the ID field whether the data is already present.
pls help ,me.
ALTER PROCEDURE [dbo].[SP_SaveGroupCla ssification]
@SubGroupName nvarchar(50),
--@GroupId int,
@ParentId int,
@ClassType nchar(2),
@RootId int
as
begin
INSERT INTO GroupClassifica tion
(GroupName, ParentId, ClassType, RootId)
VALUES (@SubGroupName, @ParentId,@Clas sType,@RootId)
end
return
Here i need to check the value in (@SubGroupName not to be repeated.it is my key field.
thank u
i am a beginner, i have written an insert stored procedure.
i need my SP to check for the ID field whether the data is already present.
pls help ,me.
ALTER PROCEDURE [dbo].[SP_SaveGroupCla ssification]
@SubGroupName nvarchar(50),
--@GroupId int,
@ParentId int,
@ClassType nchar(2),
@RootId int
as
begin
INSERT INTO GroupClassifica tion
(GroupName, ParentId, ClassType, RootId)
VALUES (@SubGroupName, @ParentId,@Clas sType,@RootId)
end
return
Here i need to check the value in (@SubGroupName not to be repeated.it is my key field.
thank u
Comment