Skip to Content.
Sympa Menu

freetds - [freetds] freebcp from Sybase to SQL Server 2008 (euro symbol)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ananthbv AT gmail.com
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] freebcp from Sybase to SQL Server 2008 (euro symbol)
  • Date: Wed, 29 Dec 2010 19:47:27 -0500

Hi,

I am trying to freebcp out data from a table Sybase and freebcp it in
to a SQL Server table. The FreeTDS installed is on a Linux box

Some of the data contain a euro symbol. The output file of freebcp
shows the euro symbol as '~@'. When that data is loaded into the table
with freebcp in, it is failing with the error

Starting copy...
Msg 20088, Level 3
I/O error while writing bcp error file

The error file (passed as -e parameter to the freebcp in command shows
the row (and mentions the column number) which has the euro symbol.

The table definition is as below:

CREATE TABLE dbo.tmpreq
(
id int NOT NULL,
price varchar(20) NULL
)

On the SQL Server side, I tried making the varchar column a nvarchar
column. The freebcp in worked, but the euro symbol was replaced with a
'?'.

Could someone please advise what I should do to get the freebcp
working? Is there a char set setting somewhere?

sp_helpsort on sybase shows iso_1 and the same command on SQL Server
says Latin1-General.

I also tried one more thing. From my windows desktop, i did a sybase
bcp out with -J iso_1 and did a sql server bcp in with -C RAW. With
this, i was able to load all rows sucessfully with the euro symbol
intact. But since I'll have to run the data load from unix scripts, I
cant use windows commands.

Some other details:
FreeTDS version: 0.82-1
Sybase: 12.5
SQL Server: 2008 R2


Thanks.




Archive powered by MHonArc 2.6.24.

Top of Page