Wednesday, December 7, 2011

Exporting nvarchar fields from SQL Server to a csv file

I am posting this more so for a reminder for myself to acknowledge myself that there is something called observation.

I am working on this data migration project(like I didnt say that earlier!) and I was exporting firstname and lastname (nvarchar fields) to a csv file and I was having issues on the final export. I was getting the following error:



I searched on the internet to find a solution to it, but couldn't find one. I was feeling frustated. Then I thought there must be something that should solve it.

I went all over again through the sql server export screens and found that little tiny checkbox that my eyes weren't able to catch before:


So I marked the "Unicode" checkbox, and I was able to export all my records successfully!

Moral of the story: Keenly observe the details before banging your head on the monitor!