To access the System.Int32 value of a numeric custom attribute view the configuration and note the identifier.




To access the value of the custom attribute the GetCustomAttributeInteger function can be used, this will return a T-SQL INT value, or NULL if the custom attribute is not defined.


SELECT 

  [dbo].[ItemCore].[ItemID] AS [ItemID], 

  [dbo].[ItemCore].[Name] AS [Name],

  [dbo].[GetCustomAttributeInteger] ([dbo].[ItemCore].[ItemID], '17b4e771-2e02-4c97-8b2f-eb77b97a4e80') AS [PIN number]

FROM [dbo].[ItemCore]

WHERE 

  [dbo].[ItemCore].[ItemDeletedDate] IS NULL