Problem with delete with subquery

More
4 years 10 months ago #14462 by CEDPIERI
Hello just a couple of days ago we purchased latest PGNP 1.4.0.3516 SE version.
Setup and creating a new linked server was fine.
Select and update work but if we issue a
Code:
DELETE FROM [MYPGNP_SERVER].[mypgdb].[public].mypgtable WHERE mypgkey1 in (SELECT mysqlkey1 from SQLDB.sqltable)
it affects 0 rows and nothing is deleted on postgreSQL db
but if we issue:
Code:
SELECT * FROM [MYPGNP_SERVER].[mypgdb].[public].mypgtable WHERE mypgkey1 in (SELECT mysqlkey1 from SQLDB.sqltable)
it returns n rows that are the n that have to be deleted.
We are in hurry because system is delaying production.

Hope we get answer from support or from Forum ASAP.

Thanks in Advance,

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #14464 by admin
Please run PGNProfiler as Administrator, and collect trace from the linked server queries. Then save the trace as *.pgl file and send to us. We need details for troubleshooting.

Also, please send DDL for mypgtable and sqltable tables. I will try to reproduce the issue.

As a temporary workaround consider using OPENQUERY or EXEC syntax, e.g.
EXEC('delete FROM [public].[mypgtable] where df_ana_key_host in (123546)') AT [TEST_PGNP]

Please Log in or Create an account to join the conversation.

Time to create page: 0.138 seconds
Powered by Kunena Forum