HomeActive Query Builderquestions about AND, OR under the latest java version

questions about AND, OR under the latest java version


Hello,

I'm using the latest Active Query Builder's Java version to create a query with different conditions on the same field, such as:




SELECT DISTINCT store_type FROM stores
WHERE EXISTS (SELECT * FROM cities_stores
WHERE cities_stores.store_type = stores.store_type);


SELECT DISTINCT store_type FROM stores
WHERE NOT EXISTS (SELECT * FROM cities_stores
WHERE cities_stores.store_type = stores.store_type);



SELECT DISTINCT store_type FROM stores s1
WHERE NOT EXISTS (
SELECT * FROM cities WHERE NOT EXISTS (
SELECT * FROM cities_stores
WHERE cities_stores.city = cities.city
AND cities_stores.store_type = stores.store_type));


(Examples coming from MySQL:
http://dev.mysql.com/doc/refman/5.0/en/exists-and-not-exists-subqueries.html)

I feel unable to create such criteria with the editor. So could anyone tell me how can I create these samples?


Shoud I use another version (ActiveX, VCL, etc) instead of Java to build these queries?

Thanks a lot.


With my best wishes,

Yi SHU
Rosière Fontaine | email
May 25 2009, 03:03 PM
There is short guide how to work with sub-queries:
http://www.activequerybuilder.com/hs90.html
But the context menu with "Insert sub-query" item is not yet implemented in the Java version. So you can only insert sub-query by text for a while.
Eugene Starkov [ActiveDBSoft] | email
14 hours, 18 mins since original post
This topic is closed