unable to insert into "order" column

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
karyagin-v
Posts: 1
Joined: Mon 26 Aug 2019 12:36

unable to insert into "order" column

Post by karyagin-v » Mon 26 Aug 2019 13:21

HI.
I use ODBC Driver for PostgreSQL as a linked server in Microsoft SQL Server 2014 (64 bit)
I use construction like that:

Code: Select all

insert openquery(PG_DB,'select "value","order" from "delme"')
select [value],[order] from [delme]
And i get error:
OLE DB provider "MSDASQL" for linked server "PG_DB" returned message "[Devart][ODBC][PostgreSQL]syntax error at or near "ORDER"".

when i rename the column in the postgresql table as uppercase i.e.

Code: Select all

insert openquery(PG_DB,'select "value","ORDER" from "delme"')
select [value],[order] from [delme]
it works, but i cannot rename such column in DB because it has to be always used in quotes (it is register-sensitive)

I have seen viewtopic.php?f=55&t=35069 but this is something different, i'm afraid, and select * from "delme" doesn't work either.

Nevertheless, yours driver is great for mssql! Much better than the stock one.

Post Reply