How to check a parameter for #

  • Hi Guys,

    I have a procedure which inserts a record into table but i want to check the parameters before if the insert if they contain # then dont update else update

    this is my procedure i want to condition it with an if statement

    if @Column1 contains # or @column2 contains # or @column3 contains # then dont do insert?

    Can someone help me please.

    INSERT INTO Generis.dbo.CustomerBankDetails

    (UID ,Column1,column2,Column3)

    VALUES

    (@Uid ,@column1,@column2,@column3)

  • This was removed by the editor as SPAM

  • See i was thinking more towards a charindex but your snippet works perfectly.

    Thank you 😀

  • This was removed by the editor as SPAM

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

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