-1

I have 2 tables

Table1 : EmployeeID nvarchar(20), EmployeeName nvarchar(50)

(created by somebody few years ago.)

Table2 : EmployeeID nvarchar(20), EmployeeName nvarchar(50)

(I recently created to update the application.)

However, it seem that i can't compare some unicode characters. Ex: 'Ð' in 'Ð123'. I tried this query but it not work for those characters.

update Table2 set
Table2.EmployeeName = (select Table1.EmployeeName from Table1
where Table1.EmployeeID like Table2.EmployeeID)

and also

update Table2 set
Table2.EmployeeName = (select Table1.EmployeeName from Table1
where Table1.EmployeeID like N'%' + Table2.EmployeeID +'%')

but it still not work. Both tables have this 'Ð123' in EmployeeID column, and they are all unicode type. So i think that because of the different version of unicode may cause this problem, but i don't know how to solve it. Hope you can help.

Frzzy
  • 299
  • 1
  • 2
  • 16
  • 1
    Please explain what “not work” means. It is extremely unlikely that “different version of unicode” has anything to do with your problem; it is much more likely the database collation was different when the earlier table was created. – Dour High Arch Apr 10 '14 at 02:25
  • It return 0 rows effect. But i find the way to temporarily fixed it. Thank you. – Frzzy Apr 10 '14 at 04:18

1 Answers1

0

I find a temporarily way to fix this by load table1 and table2 to c# application and then compare and update to back to database.

Frzzy
  • 299
  • 1
  • 2
  • 16