ISNULL Function requires 2 arguments

  • Hi all,

    My querey :

    Decalre @international SMALLINT

    I am Getting @International from some other table in my cursor

    The requirement is if @international is NULL it should be 'N'

    If it is not null then it should insert @international value which i got above (from what ever joined tables)

    Then i am doing an Insert

    Insert Into Table_XYZ

    Values(1,'Abc','USA',ISNULL(@International,'N',@international) )

    Error:THE ISNULL Function requires 2 Arguments....

    Can some me helpm on this...

    Thanks

  • Yes, ISNULL does require only two arguments, you are trying to use 3 arguments.

    ISNULL ( check_expression , replacement_value )

    Andrew SQLDBA

  • it worked actually

    Values(1,'Abc','USA',ISNULL(@International,'N') )

    thanks

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

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