Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

 = Unicode import

Status
Not open for further replies.

micang

Technical User
Aug 9, 2006
626
US
SQL 2005

Hi All,

I have a unicode csv file, the first 3 characters are-  -. I try import this file directly into SQL (using the wizard) it does not import. If I manually remove these 3 characters(in a editor), then I am able to import in to SQL (via the wizard).

We receive this file daily from a ftp feed, therefore the ultimate goal is to import it directly into SQL once received.

I am a tad lost of what to try next, to get SQL to somehow "reconise" these characters.

Any info in the right direction will be appreciated.

Thank you.

Michael

 
Are you trying to import the csv into a table? If so is the column that is going to contain the values "" defined as nvarchar if not that could be one reason why it's failing.

Another could be that the collation set between the two is different. In which case you would have to match the collation in the table to that of the csv file.

Hope this helps.
 
Hi Mkal,

Thank you for your input.

It turns out that the original file on the ftp (source) does not have these characters at all, but they get inserted into the destination file. I am researching and it seems it's an FTP thing with regards to ASCII or Binary.

I got the supplier to send me their file, on their server, via email. It does not have those characters and it imports into SQL no problem.

So it's basically sorting out the FTP transfer itself, it seems. I was not aware that via FTP the contents of a file could be changed.

Thanks again.

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top