Skip to content
Advertisement

Issue with query in DB2 –Not able to find the cause

I was trying to execute the below query in Db2 and its giving me some error, which I am not able to identify the root cause.Could someone please help here.

The error which I am getting when executing the above query is

DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=delete from;by qsMatchSetID ) ;<from>, DRIVER=3.58.81

But if I comment the delete portion alone and execute the query it is working fine, something like below.

Advertisement

Answer

You may use data-change-table-reference of subselect, if you want to use CTE for the data change statement.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement