SQL Server - replicating euro symbol from oracle to sqlserver

Asked By siddu
20-Nov-09 07:04 AM
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
SQL Server
(1)
Oracle
(1)
Nvarchar
(1)
Varchar
(1)
MyServer
(1)
Codepage
(1)
Sproc
(1)
Euro
(1)
  Dan Guzman replied to siddu
20-Nov-09 07:44 AM
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.


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/
  Revansiddayya N replied to Dan Guzman
27-Nov-09 03:10 PM
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 replied to Revansiddayya N
27-Nov-09 08:51 AM
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/
Create New Account
help
Possible server bug, would welcome your views SQL Server Hi all, I have run into a bug and AFAICS it is not me (you may well decide otherwise though). Setup is Win7, 32-big, dual core and sufficient memory, sql server 2008 R2, patched to SP1 (bug appears pre and post patch). select @@version -> Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (Intel X86) Jun 17 2011 00:57:23 where minclassdata <> maxclassdata -> Msg 8114, Level 16, State 5, Line 1 Error converting data type varchar to float. Doesn't like it. Try in two steps instead: select * into #blaggle from
Different Collations SQL Server I have one question. I have varchar columns in table1 and table2. When you have the same collation, the inner join looks there isome performance difference and can you explain a bit? My thinking: As I know, SQL always converts(in background) all data in unicode, if they are in ASCII(varchar), before working with them. So, if columns are in ACSII(varchar), SQL must first convert both columns to unicode and the collation does not impact the performance same collation or from the different collations? If the columns are already written as unicode(nVarchar) than it is difference in performance. If both columns have the same collation it does
migration from SQL 2000 to SQL 2008 SQL Server I am working on to migrate my SQL 2000 database to SQL 2008. I use SSMS to connect 2 SQL Servers and want to backup SQL 2000 database and restore on SQL 2008. I just realized that I only can access
Linked server question. SQL Server I am not sure where to put this, so I just chose two newsgroups with portion because this happens to not work on only these two machines) I added SQL2005 server to the linked server in both ServerA and and ServerB. SQL 2005 shows up in the linked servers area of them both. I can actually see for a simple test query) on both ServerA and ServerB, it fails and returns this. Server: Msg 7202, Level 11, State 2, Line 1 Could not find server 'Server_2005' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. But I did execute
FETCH_STATUS in nested cursors SQL Server I read SQL server 200 document for nested cursors. It uses @@FETCH_STATUS variable to check FETCH STATUS for inner and outer cursor. I just wonder does SQL server 2000 know which cursor fetch status? Do I need use different variable for different cursors How many layer nested cursors SQL server 2000 support? Your help is great appreciated, iccsi SQL Server Programming Discussions SQL Server 2005