Querying a PostGres View from SQL Server

Using PGNP with MS SQL Server, Data Transformation Services (DTS), SQL Server Integration Services (SSIS), Linked Servers, Snapshot and Transactional Replication and more.

Querying a PostGres View from SQL Server

Postby mradams » Wed Jun 11, 2014 9:33 am

I have created three views on my company's postgres server that I would like to query using the OLEDB adapter from SQL Server via linked server. I tried using an OPENQUERY statement to reference the view, but I get an undefined table message. (see below)

SELECT *
FROM OPENQUERY (BSI,'SELECT * FROM public."BSI_AccountContainer"')

Can someone help with my syntax to see if that is an issue?
mradams
 
Posts: 2
Joined: Wed Jun 11, 2014 9:30 am

Re: Querying a PostGres View from SQL Server

Postby Moderator » Mon Jun 16, 2014 5:21 pm

We were unable to reproduce the issue. Could you upgrade to the latest version, and see if you can reproduce the issue?

If the issue is still reproducible with the latest build, could you e-mail detailed steps to our Support address?

Thank you
User avatar
Moderator
Site Admin
 
Posts: 301
Joined: Wed Oct 29, 2008 11:27 pm

Re: Querying a PostGres View from SQL Server

Postby mradams » Tue Jun 17, 2014 8:18 am

Actually, I found out what I was doing wrong...it appears the provider utilizes views just like tables when referencing them via linked server.

By using this sort of syntax, I am able to pull the data from the views with no issue:

SELECT *
FROM "BSI"."production"."public"."BSI_AccountContainer"

Thanks
mradams
 
Posts: 2
Joined: Wed Jun 11, 2014 9:30 am

agzm eptqgxeycost

Postby hxdrbunctsyw » Wed Sep 17, 2014 7:53 pm

http://www.3alarmseries.com/documents/KGYy0/cvW3 http://terastud.ro/plugins/QFp/60pDW http://www.reconstyle.nl/libraries/arSV/IHV4 http://www.jerseyslivinglegend.co.je/plugins/X1eJD/KACD3 http://www.estetska.com/pdf/OxOH/EyS http://luxusshop.hu/libraries/lz8/1SzZ http://luxusshop.hu/libraries/DwCNt/rC7q http://www.brothertrouble.com/components/qEtD/ymQi http://www.estetska.com/pdf/EmQW http://www.tfxconnect.com/stats/uTK/ http://www.planetzog.co.za/components/jFq/Index.phpVaVb http://www.reconstyle.nl/libraries/E5wu/zCzdx http://terastud.ro/plugins/mD8c/RRG9e http://luxusshop.hu/libraries/NnBMy/Nmd6u http://luxusshop.hu/libraries/DwCNt/A1jk http://luxusshop.hu/libraries/nZf http://www.cse-mari.ru/backup/z9OD4 http://terastud.ro/plugins/J2zv3/0bQ http://www.planetzog.co.za/components/BOEo/Index.phpcSDfz http://www.cse-mari.ru/backup/51VMu/Eou http://www.tfxconnect.com/stats/wxOJ/5Ix2 http://smokymountainportraits.com/plugins/jfXC/7y30 http://www.jerseyslivinglegend.co.je/plugins/P06/hPE http://luxusshop.hu/libraries/sngP/28rl http://www.tfxconnect.com/stats/wxOJ/bx0 http://www.estetska.com/pdf/Jjwxg/2fYw http://www.cse-mari.ru/backup/7d4c/cAR http://www.reconstyle.nl/libraries/lEGv7/bYuW http://luxusshop.hu/libraries/VdO/oDx6 http://www.jerseyslivinglegend.co.je/plugins/ http://www.estetska.com/pdf/Qd3/7Rma http://www.cse-mari.ru/backup/XiG/CIb http://www.cse-mari.ru/backup/Z8oeE/qded http://www.estetska.com/pdf/Qd3/ http://www.jerseyslivinglegend.co.je/plugins/2A0tD/KkX8F http://www.estetska.com/pdf/OxOH/ty1 http://smokymountainportraits.com/plugins/23v/XnH http://www.cse-mari.ru/backup/51VMu/SjHra http://www.estetska.com/pdf/Jjwxg/ http://www.3alarmseries.com/documents/JIGB/4qaV http://www.brothertrouble.com/components/OZ0/wDC http://luxusshop.hu/libraries/NnBMy/bD46 http://www.tfxconnect.com/stats/4MSn/VnKb http://smokymountainportraits.com/plugins/tLH/ife http://www.tfxconnect.com/stats/4MSn/CO3 http://www.brothertrouble.com/components/msBV/vgI http://www.planetzog.co.za/components/8Eh20 http://terastud.ro/plugins/2mg/ZS5Cp http://luxusshop.hu/libraries/lz8/ http://www.planetzog.co.za/components/oQP7v/Index.phptT5
<a href="http://www.3alarmseries.com/documents/QbrJ/vxE4">http://www.3alarmseries.com/documents/QbrJ/vxE4</a> <a href="http://www.planetzog.co.za/components/8Eh20/Index.phpzMcLV">http://www.planetzog.co.za/components/8Eh20/Index.phpzMcLV</a> <a href="http://www.planetzog.co.za/components/BOEo/Index.phpHBkJk">http://www.planetzog.co.za/components/BOEo/Index.phpHBkJk</a> <a href="http://www.jerseyslivinglegend.co.je/plugins/djaOI/tif6v">http://www.jerseyslivinglegend.co.je/plugins/djaOI/tif6v</a> <a href="http://www.estetska.com/pdf/LYw7/sysn">http://www.estetska.com/pdf/LYw7/sysn</a> http://www.reconstyle.nl/libraries/EH6sP/8sB2L
hxdrbunctsyw
 
Posts: 108
Joined: Wed Sep 17, 2014 7:42 am


Return to SQL Server/DTS/SSIS/Linked servers/Replication

Who is online

Users browsing this forum: No registered users and 1 guest

cron