Problem with delete with subquery

More
1 year 3 months ago #14462 by CEDPIERI
CEDPIERI created the topic: Problem with delete with subquery
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
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:
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
1 year 3 months ago #14464 by admin
admin replied the topic: Problem with delete with subquery
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.062 seconds
Powered by Kunena Forum