Undefined function 'replace' in expression in execute Query


#1

I am having problems running the “replace” function from a query in activity ExecuteQuery in UIPATH. In the 2016.2.6232 version it works without problems. However in 2016.2.6274 the error appears: Undefined function ‘replace’ in expression.
Does anyone know of a solution.

OS Version: Windows 7

Query:

"SELECT LTRIM(REPLACE([REFERENCE 1],‘BP’,’’)) & IIF (INSTR([REFERENCE 4],’-’) > 1,LTRIM(STR(REPLACE(LEFT([REFERENCE 4] , INSTR([REFERENCE 4],’-’)),’-’,’’))), IIF(ISNUMERIC([REFERENCE 4]), LTRIM(STR([REFERENCE 4])), [REFERENCE 4]) ) AS CODIGO,LTRIM(REPLACE([REFERENCE 1],‘BP’,’’)) AS [CODIGO_FORN] ,IIF (INSTR([REFERENCE 4],’-’) > 1,LTRIM(STR(REPLACE(LEFT([REFERENCE 4] , INSTR([REFERENCE 4],’-’)),’-’,’’))), IIF(ISNUMERIC([REFERENCE 4]), LTRIM(STR([REFERENCE 4])), [REFERENCE 4]) ) AS NOTA_FISCAL, ROUND([JEAMT],2) AS VALOR_TOTAL, [JOURNAL DESCRIPTION] AS DESCRIPTION_SERV FROM [Razao$] "

Thanks


#2

Problem solved by post: