Extra blank characters querying SQL server from Oracle

From: Ram Raman <veeeraman_at_gmail.com>
Date: Wed, 8 Mar 2023 13:27:06 -0600
Message-ID: <CAHSa0M2WaBnktLszf_XJ07EuQLb+h9F6Sog6-ia_Qta=rhFUHQ_at_mail.gmail.com>



Hi,

We have configured Oracle Gateway to query SQL server from our Oracle 19 database. However the results add a blank character to every character returned for columns in sql server that are defined as unicode columns, ie, nvarchar columns.

Here is an example of a query result in SQL plus with the source table in sql server:

    emp_id emp_name                  city
---------- ------------------------- ----------
       100 M u t h u                 New York
       200 G a r y                   Seattle
       201 D a v e                   Oak Brook


The table definition on the sql server side is:

CREATE TABLE [dbo].[employee](
[emp_id] [smallint] NULL,
[emp_name] [*nvarchar*](50) NULL,
[city] [*char*](10) NULL

) ON [PRIMARY] Is there a way in Oracle to strip off the blanks automatically, in this example for the emp_name column?

Thanks,
Ram

--

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 08 2023 - 20:27:06 CET

Original text of this message