Search code examples
javamysqlcomparedataformat

Unequal Strings : HP 5”6'5A and HP 5"6'5A


I have two tables A and B. Table A have a column called a_value varchar(20) and B have b_value as varchar(20). Both table data filled by different source by using java.

A from Excel sheet. B from xml.

HP 5"6'5A  - xml(table A)

HP 5”6'5A - Excel (Table B)

I want to take a_value which is not available in b_value.

But i always get above mentioned value.

How can i solve this issue?

cheers..


Solution

  • I have fixed by adding below condition

     String value = "HP 5”6'5A"; 
     value = value.contains("”")?value.replace("”", "\""):value);