We are executing the following query using embedded SQL in C:
DELETE archive_table FROM archive_table arc, #arc_chunk loc WHERE arc.col = loc.col
Sybase's response is:
The DELETE WHERE CURRENT OF to the cursor 'C42' failed because the cursor is on a join.
The query is bewing constructed as a C string and then executed using EXECUTE IMMEDIATE in embedded SQL.
Is there a way to perform this DELETE without the Sybase optimizer creating a cursor (which fails) to execute it?