Today one test failed in
SOAtest due to feed character (
). In SOAtest, if I get customer data
from SQL server , the data appears in Result As XML
-> Edit and it shows the following data.
<LastName>Lin
</LastName>

 is line feed character
and it is not visible in SQL Server. I can use LEN(LAST_ NAME) to know how many
characters in this field.
How to avoid the issue of line
feed character and carriage return using SQL query? After using the following one,
the test passed in SOAtest.
RTRIM(replace(replace(LAST_NAME,char(10),' '),char(13),' ')) LastName

 is line feed character and it is not visible in SQL Server. I can use LEN(LAST_ NAME) to know how many characters in this field.
RTRIM(replace(replace(LAST_NAME,char(10),' '),char(13),' ')) LastName
No comments:
Post a Comment