hi, I have this procedure CREATE PROCEDURE dbo.CreerComplement -- Add the parameters for the stored procedure here @CMP_ID uniqueidentifier = '00000000-0000-0000-0000-000000000000' OUTPUT, @Dos_ID uniqueidentifier, @Cmp_NoBr nvarchar (50), @Cmp_Desc nvarchar (50), @Cmp_verse money, @Node nvarchar (50)ASBEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; IF @CMP_ID IS NULL OR @CMP_ID = '00000000-0000-0000-0000-000000000000' BEGIN set @CMP_ID = NEWID () END -- Insert statements for procedure here UPDATE dbo.CSR_COMPLEMENT SET CMP_ID = @CMP_ID , DOS_ID =@Dos_ID ,CMP_NOBR =@Cmp_NoBr , CMP_DESC =@Cmp_Desc , CMP_MTVERSE =@Cmp_verse , CMP_DATE = CURRENT_TIMESTAMP WHERE CMP_ID = @CMP_ID IF @@ROWCOUNT =0 BEGIN ---verifions le nbre d'enregistrement pour ce dossier ---2: cptons le nbre d'enregistrement pour ce dos DECLARE @NbreEnregistrement int set @NbreEnregistrement =( SELECT COUNT (DOS_ID) FROM CSR_COMPLEMENT WHERE CSR_COMPLEMENT.DOS_ID = (SELECT dbo.CSR_DOSSIER.DOS_ID FROM dbo.CSR_DOSSIER WHERE DOS_NODE =@node)) IF @NbreEnregistrement=0 BEGIN @Cmp_Desc ="VERSEMENT INITIAL" END ELSE BEGIN @Cmp_Desc ="COMPLEMENT" + @NbreEnregistrement END INSERT INTO CSR_COMPLEMENT VALUES(@CMP_ID ,(SELECT dbo.CSR_DOSSIER.DOS_ID FROM dbo.CSR_DOSSIER WHERE DOS_NODE =@node ),@Cmp_NoBr ,@Cmp_Desc , @Cmp_verse ,CURRENT_TIMESTAMP ) ENDEND
but just after the If instructions i have this errorMsg 102, Level 15, State 1, Procedure CreerComplement, Line 43Syntaxe incorrecte vers '@Cmp_Desc'.Msg 102, Level 15, State 1, Procedure CreerComplement, Line 47Syntaxe incorrecte vers '@Cmp_Desc'.Msg 156, Level 15, State 1, Procedure CreerComplement, Line 55Syntaxe incorrecte vers le mot clé 'END'.Can somebody please give me a hand?I have looked all over and i can't understand why this errorthanksMarclas