Hi there,
I'm trying to set a variable in a function in SQL Server. My syntax uses:
IF @Variable1='value' SET @Variable1='new value'
this works, but when I add in AND it doesn't seem to work!
i.e.
IF @Variable1='value' AND 'Varialble2 = 'value' SET @Variable2='new value'
Have I the right syntax here, some help will be much appreciated.
Thanks
I'm trying to set a variable in a function in SQL Server. My syntax uses:
IF @Variable1='value' SET @Variable1='new value'
this works, but when I add in AND it doesn't seem to work!
i.e.
IF @Variable1='value' AND 'Varialble2 = 'value' SET @Variable2='new value'
Have I the right syntax here, some help will be much appreciated.
Thanks