Advertisement
Ruslan_Rayanov

as_nt_processNotifications

Feb 9th, 2025
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.35 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[as_nt_processNotifications]
  2.    @ids nvarchar(512),
  3.     @username nvarchar(128)
  4. AS
  5. BEGIN
  6.     update as_nt_notifications
  7.     set processed=1, processedDate=getdate()
  8.     where [to]= @username and ( @ids ='' or  id in(select Value from dbo.split(@ids, ',')))
  9.         and (processed is null or processed =0)
  10.     select 1
  11. END
  12.                
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement