SQLQuery :: Generic statement that always returns and empty set.

SELECT * FROM REPORTS WHERE 0=1;
SELECT * FROM REPORTS WHERE null=null;
SELECT * FROM REPORTS WHERE rownum<0;

These all return empty sets.

rownum is supported with gigaspaces. The UI returns one row with rownum<0 clause. The GigaSpace API seems to return all rows with the rownum<0 and with rownum<1 in the where clause.

Is there some clause that I can use to return an empty set? I am using this for example when calculating criterion on the fly. When I get no sub-items that match a sub query (used to form an in statement), I cant do something like: WHERE levelId=0 and reportId IN( ) <<<-- because there is an empty clause. I just need something to replace this empty in statement, and can't just leave it out of the query, as the query may be more complex.

Also, am I wrong about the GigaSpace API and rownum?

Thank you.

{quote}This thread was imported from the previous forum.
For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3550]{quote}

1 Answer

When using the GigaSpace interface with the readMultiple operation you should use the max_objects parameter to limit the returned objects amount.
The queries you have listed are not supported with GigaSpaces. Not sure what it means to support these. There is no logic to support these.