From 5d64bc16a80136169065ca9f25f44b1a707d4d03 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Thu, 16 May 2019 14:06:50 -0500 Subject: [PATCH] add sql to get the application errors. --- getApplicationMessages.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 getApplicationMessages.sql diff --git a/getApplicationMessages.sql b/getApplicationMessages.sql new file mode 100644 index 0000000..02559c9 --- /dev/null +++ b/getApplicationMessages.sql @@ -0,0 +1,20 @@ + select '{"Logic":"-", "Field":"LogText", "Comp":"~", "Value":"/^' + + replace(replace(replace(replace(replace(replace(replace(TXT ,'%1','.*'),'%2','.*'),'%3','.*'),'%4','.*'),'%5','.*'),'%6','.*'),'%7','.*') + + '/"},' from ( + select replace(replace(replace(replace(replace(replace(TXT,'"','\"'),'(','\\('),')','\\)'),'.','\\.'),'*','\\*'),'+','\\+') "TXT" from ( + select CASE WHEN CHARINDEX(char(10),TXT)=0 THEN txt + ELSE SUBSTRING(TXT,0,CHARINDEX(char(10),TXT)-1) + END "TXT" from ( + select distinct convert(nvarchar(max),text) TXT + from RpsMessageText + where status != 'd' + and language != 'de' + and rpsmessagepkey not in (select pkey from rpsmessage where CodePrefix in( 'ANA','ASP','BWI','GRI','PDA','STR','RPS','TPO','SVC','PLN') or id like '%Char' ) + ) a + where txt not like 'Validation notification%' + and txt not like 'Validiation notification%' + and txt not like 'Notificação de validação%' + and txt not like '¡Alerta de Validación!%' + ) b + ) c + Where len(convert(varchar(max),TXT)) > 10 /* anything shorter than 10 will be some sort of label or so.*/