Advertisement
hecrus

Canban UpdateField

Oct 24th, 2020
2,488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.40 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[crud_kanbanOrders_updateField]
  2.     @itemID int,
  3.     @field nvarchar(64),
  4.     @value nvarchar(max),
  5.     @username nvarchar(64)
  6. AS
  7. BEGIN
  8.  
  9. if(@field = 'statusID') begin
  10.     update tst_orders
  11.     set statusID = cast(@value as int)
  12.     where id = @itemID
  13. end else begin
  14.     select 'Невалидный код свойства' Msg, 0 Result
  15.     return
  16. end  
  17. select '' Msg, 1 Result
  18.  
  19. END
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement