Icon View Incident Report

Serious Serious
Reported By: Bill Sorenson
Reported On: 4/13/2004
For: Version 4.05 Build 1
# 1665 Using UNION Queries in a Subselect Query May Cause an Access Violation

The following query gives an Access Violation every time on my test tables. Testing manually with the Database System Utility, the subquery runs, but neither a DELETE nor a SELECT will work on the graphics table using the subquery.

DELETE FROM graphics WHERE graphics_id NOT IN
(SELECT graphics_id FROM products
UNION SELECT graphics_id FROM category
UNION SELECT dtl_graphics_id FROM category);

Workaround:



SELECT  graphics_id g1 into memory\temp FROM products
    UNION SELECT graphics_id  FROM category
    UNION SELECT dtl_graphics_id  FROM category;
DELETE FROM graphics WHERE graphics_id NOT IN (select g1 from memory\temp
where g1 is not null);



Comments Comments and Workarounds
Thanks to Robert Kaplan for the workaround above.


Resolution Resolution
Fixed Problem on 4/16/2004 in version 4.06 build 1
Image