Is there any other way for me to execute this quiry.plz help.Here is the stored procedure
Code:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[ChkDup] @StudentID nvarchar(50), @ModuleCode nvarchar(50) AS if exists(SELECT COUNT(StudentID),COUNT(ModuleCode) FROM StudentID Group By StudentID HAVING COUNT(StudentID) < 1 AND COUNT(ModuleCode) < 1) INSERT INTO StudentModule(StudentID,ModuleCode) VALUES(@StudentID,@ModuleCode)
