0
I have a field in the page that receives only number, but when I compare in the function this value of the page with what is in the bank, does not return to search.
I’m trying to use the Replace
to take the formatting of the value of the bank to compare with the value coming from the page.
this and the code I’m using
IF @charLinhaDigitavel IS NOT NULL
BEGIN
SET @SQL = @SQL + @CONDICAO + 'TIT.LinhaDigitavel LIKE ''%''+'+ '''' +replace( @charLinhaDigitavel,''.'',''''),replace( @charLinhaDigitavel,'' '','''' + '''' +'+''%'' '
SET @CONDICAO = ' AND '
END
Thanks for helping, more analyzing better what I posted, this giving replace in place, because the value of this field is being filled the page and the page has already been treated to accept only number, replace, I had to give the value that came from the bank, in case "TIT.Linhadigitavel", and I used the replace chained in the "TIT.Linhadigitavel".
IF @charLinhaDigitavel IS NOT NULL BEGIN SET @SQL = @SQL + @CONDICAO + 'REPLACE(REPLACE(TIT.LinhaDigitavel,".","")," ","") LIKE ''%''+'+ '''' + @charLinhaDigitavel + '''' +'+''%'' ' SET @CONDICAO = ' AND ' END
– krispim
I hope you helped solve your problem =)
– Márcio Lordelo