delaring a null parameter

  • HI

    how can i set a null value when declaring a parameter

    example

    CREATE PROCEDURE dbo.GestionStatutDossier

    -- Add the parameters for the stored procedure here

    @StaId int NULL,

    @DosID uniqueidentifier,

    @staDate datetime,

    @staBL nvarchar (50),

    @staCRprod nvarchar (50)

    AS

    it always send back an error

    thkx

  • you need to set the variable = null

    CREATE PROCEDURE dbo.GestionStatutDossier

    -- Add the parameters for the stored procedure here

    @StaId int = NULL,

    @DosID uniqueidentifier,

    @staDate datetime,

    @staBL nvarchar (50),

    @staCRprod nvarchar (50)

    AS

  • thanks!!

    It OK

  • marclas (5/8/2012)


    HI

    how can i set a null value when declaring a parameter

    example

    CREATE PROCEDURE dbo.GestionStatutDossier

    -- Add the parameters for the stored procedure here

    @StaId int NULL,

    @DosID uniqueidentifier,

    @staDate datetime,

    @staBL nvarchar (50),

    @staCRprod nvarchar (50)

    AS

    it always send back an error

    thkx

    +1

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉

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

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