Re: freebcp from Sybase to SQL Server 2008 (euro symbol)

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Just to make sure, the 'price' column in the table has euro symbol.

On Wed, Dec 29, 2010 at 7:47 PM,  <[email protected]> wrote:
> 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.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.