Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

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

oracle allows:

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}

asked 2010-12-01 14:12:12 -0500

jdoran13 gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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.

Can't you have empty IN with your SQL Query?

answered 2010-12-01 14:22:50 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

I will try again, but I was previously certain that an empty in will throw an exception.

jdoran13 gravatar imagejdoran13 ( 2010-12-01 17:11:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2010-12-01 14:12:12 -0500

Seen: 332 times

Last updated: Dec 01 '10