Skip site navigation (1) Skip section navigation (2)

BUG #3251: selection of numeric columns from MS SQL Server return wron values

From: "CarlosCastaneda" <kjatwork(at)gmx(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3251: selection of numeric columns from MS SQL Server return wron values
Date: 2007-04-24 13:04:54
Message-ID: 200704241304.l3OD4sSC044226@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3251
Logged by:          CarlosCastaneda
Email address:      kjatwork(at)gmx(dot)net
PostgreSQL version: 8.2.4
Operating system:   Windows XP
Description:        selection of numeric columns from MS SQL Server return
wron values
Details: 

I used to run queries against PostreSQL from MS SQL Server via linked server
over OLEDB Provider ODBC.
The interface used to work up to version 8.2.3. As of lastest update (8.2.4)
selecting data on numeric(12,2) colums always return 0. Converting the
numeric columns to real succeeds.
Example:
select * from OPENQUERY([Postgres], 'select numericcolomn from table')
returns 0.
select * from OPENQUERY([Postgres], 'select numericcolomn::real from table')
returns the correct values.

But I want to insert data into PostgreSQL via MS SQL Server.
insert into select * from OPENQUERY([Postgres], 'select numericcolomn from
table where 1=0')
select * from SQLServertable

Running the statement above only inserts 0 values.

insert into select * from OPENQUERY([Postgres], 'select numericcolomn::real
as numericcolumn from table where 1=0') select * from SQLServertable
doesn't work either.

It seems, as if there has been a major change in pgODBC provider.

The ODBC Provider version is 08.02.03.00

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2007-04-24 14:10:03
Subject: Re: [HACKERS] BUG #3244: problem with PREPARE
Previous:From: Heikki LinnakangasDate: 2007-04-24 12:50:17
Subject: Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group