Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

replicating euro symbol from oracle to sqlserver

6 views
Skip to first unread message

siddu

unread,
Nov 20, 2009, 7:04:43 AM11/20/09
to
Hi,

I have a problem regarding euro symbol (?) replication from Oracle to
SQLserver2005. At oracle side we have a column containing ? (euro symbol).
which is being replicated to sql server. The select statment for that column
displays that symbol as (?) question mark. The column at oracle is
varchar(512) and at sqlserver side is nvarchar(512)

I tried to view the column with various collations, but in vain.
select column1 collate Latin1_General_CI_AS from table1
select column1 collate Latin1_General_CI_AS_WS from table1
.
.
.

whereas I can insert the ? (euro symbol) and view it through select
statement on the same table.

Can experts throw light on this.

I think the conversion while bcp is not proper. Any ideas ?


Thanks in Advance.
Siddu

Dan Guzman

unread,
Nov 20, 2009, 7:44:44 AM11/20/09
to
Collation only affects the character set for non-Unicode columns. The euro
symbol can be stored correctly in nvarchar, as you noted and and also in the
Latin1_General_CI_AS non-Unicode columns.

> I think the conversion while bcp is not proper. Any ideas ?

So you are importing data from a flat file using BCP? BCP defaults to code
page 850, which knows nothing about the euro symbol. Try using the BCP -C
option to specify the code page that matches the file (e.g. 1252) or specify
RAW to prevent code page conversion entirely.

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/


"siddu" <revan...@rediff.com> wrote in message
news:#0t0mmda...@TK2MSFTNGP04.phx.gbl...

Revansiddayya N

unread,
Nov 27, 2009, 5:22:38 AM11/27/09
to
Many Thanks Dan, for your reply.

I did a replication from Sql server to Sql server for the table
containing
Euro sign which works fine. The symbol is replicated and can be seen
through
select stmt.

So I am now suspecting that some conversion happens when the .bcp file
is
created. But I am not getting
literature on how the bcp file is created. which sproc does this and
what
parameters influence the bcp.

Can you throw light on it.

Thanks,

Siddu

Dan Guzman

unread,
Nov 27, 2009, 8:51:18 AM11/27/09
to
> So I am now suspecting that some conversion happens when the .bcp file
> is
> created. But I am not getting
> literature on how the bcp file is created. which sproc does this and
> what
> parameters influence the bcp.

So you are creating the file using BCP? Try specifying the codepage RAW or
1252 using the /C parameter like the example below. This and the other BCP
options are listed in the SQL Server Books Online.

BCP tempdb.dbo.foo out foo.txt /S MyServer /c /T -C RAW

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/


"Revansiddayya N" <reva...@gmail.com> wrote in message
news:73c22b72-69e5-4bc6...@j19g2000yqk.googlegroups.com...

0 new messages