CREATE OR ALTER VIEW [VWDEX_RESOURCES]
as
SELECT 	[CFG_RESOURCES].[GUID],
							[CFG_RESOURCES].[PROFILE_ID],
							[CFG_RESOURCES].[ACTIVE],
							[CFG_RESOURCES].[SEQUENCE],
							[CFG_RESOURCES].[PLACEHOLDER_NAME],
							[CFG_RESOURCES].[PLACEHOLDER_TYPE],
							[CFG_RESOURCES].[PLACEHOLDER],
							CASE 
								WHEN [CFG_RESOURCES].[ERROR_ACTION] = 0
								THEN 'STOP'
								WHEN [CFG_RESOURCES].[ERROR_ACTION] = 1
								THEN 'CONTINUE'
								ELSE 'UNDEFINED'
							END										as 'ERROR_ACTION',
							[CFG_RESOURCES].[COMMENT],
							[CFG_RESOURCES].[ADDED_WHO],
							[CFG_RESOURCES].[ADDED_WHEN],
							[CFG_RESOURCES].[CHANGED_WHO],
							[CFG_RESOURCES].[CHANGED_WHEN]
	FROM [dbo].[TBDEX_CFG_RESOURCES] as [CFG_RESOURCES];
