Advertisement
DataCCIW

cust_CCIW_funct_luid_to_value

Feb 17th, 2022
1,303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.49 KB | None | 0 0
  1. USE [ArenaDB]
  2. GO
  3.  
  4. /****** Object:  UserDefinedFunction [dbo].[cust_CCIW_funct_luid_to_value]    Script Date: 2/17/2022 2:16:28 PM ******/
  5. SET ANSI_NULLS ON
  6. GO
  7.  
  8. SET QUOTED_IDENTIFIER ON
  9. GO
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. CREATE       function [dbo].[cust_CCIW_funct_luid_to_value](@LUID int)
  18.     RETURNS varchar(50)
  19.  
  20. AS
  21.  
  22. BEGIN
  23.  
  24.     DECLARE @LValue varchar(50)
  25.  
  26.     SET @LValue = (SELECT lookup_value
  27.                 FROM core_lookup
  28.                 WHERE lookup_id = @LUID and organization_id = 1)
  29.     RETURN @LValue
  30. END
  31.  
  32.  
  33.  
  34.  
  35. GO
  36.  
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement