About SQL Server IF clause [closed]

|| is not valid Transact-SQL syntax. You need to user ‘OR’ or ‘AND’

Example

IF @logpath is not null OR @ptd is not null
  BEGIN
  -- do something 
  END 

Browse More Popular Posts

Leave a Comment