Product Documentation

c-treeACE V11.0 Release Notes

Previous Topic

Next Topic

Correct Results Now Returned When Subquery Contains SKIP

A query with a SKIP in a subquery produced the wrong result. For example, the following queries should all return the same number of rows:

select c.cust_id,c.name,(select top 1 cust_id from cust where ref_id=c.cust_id) as ref from cust c;

select c.cust_id,c.name,(select top 1 skip 1 cust_id from cust where ref_id=c.cust_id ORDER BY cust_id) as ref from cust c ORDER BY c.cust_id;

select c.cust_id,c.name,(select top 1 skip 2 cust_id from cust where ref_id=c.cust_id ORDER BY cust_id) as ref from cust c ORDER BY c.cust_id;

The logic has been modified to correct this.

TOCIndex