What is wrong with the sql statement

  • Create PROCEDURE [dbo].[SRIP_Contracts]

    @Contract_ID varchar(100)

    AS

    IF @Contract_ID IS NULL

    BEGIN

    set Convert(uniqueidentifier, @Contract_ID) = NEWID()

    INSERT INTO dbo.tblContracts

    (Contract_ID)

    Values (@Contract_ID)

    End

  • At a guess...

    set Convert(uniqueidentifier, @Contract_ID) = NEWID()

    should be

    set @ContactId = Convert(varchar(100), NEWID() )



    Clear Sky SQL
    My Blog[/url]

  • Thank you. It worked.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply