Concatenate two queries having the same selected items.
The
SUPQuery class methods for
concatenating queries are:
- -
(SUPCompositeQuery *)union:(SUPQuery *)otherQuery
- -
(SUPCompositeQuery *)unionAll:(SUPQuery *)otherQuery
- -
(SUPCompositeQuery *)except:(SUPQuery *)otherQuery
- -
(SUPCompositeQuery *)intersect:(SUPQuery *)otherQuery
Note: SAP Mobile Platform adds a "LONG VARCHAR"
column for all MBO tables. UltraLiteJ cannot select a "LONG VARCHAR" in a union
query. Ensure that in the selected fields you do not use * in the
select of a union query.
This example obtains the results from one query except for those results
appearing in a second
query:
SUPQuery *query1 = [SUPQuery getInstance];
//other code for query1
SUPQuery *query2 = [SUPQuery getInstance];
//other code for query 2
SUPQuery *query3 = (SUPQuery*)[query1 except:query2];
[SMP101SMP101DB executeQuery:query3]