Synergex.SynergyDE.Select.NoCaseGroupBy
Group selection results (case insensitive)
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
namespace Synergex.SynergyDE.Select public class GroupBy public class NoCaseGroupBy extends GroupBy
The NoCaseGroupBy class extends the GroupBy class. Like the GroupBy class, the NoCaseGroupBy object provides a subset of the functionality of a SQL “GROUP BY” clause, which arranges identical data into groups, and returns distinct records based on field specifications. However, NoCaseGroupBy is designed for alpha fields that require a case-insensitive sort and cannot be used with integer fields, while GroupBy is case sensitive and can also be used with integer fields.
Once created, any object used by the Select (From, Where, NoCaseWhere, GroupBy, NoCaseGroupBy, On, OrderBy, NoCaseOrderBy, and Sparse) must remain in contact with the same record(s) specified in the From object(s) as well as fields referenced in the Where, NoCaseWhere, On, OrderBy, and Sparse objects that are contained in the record(s). In other words, you can’t create one of these objects and pass it to another routine unless that routine has direct access to the original record. If this is not the case, an InvalidOperationException or $ERR_INVOPER error (“Where operator requires at least one field reference”) will result when creating the Select object. On the other hand, all data references outside a From object’s record are copied during the object’s creation and are not required to remain in contact with the original data. |
public static varargs NoCaseGroupBy(field1, ...)
Sorts and groups records without case sensitivity.
To build code with the NoCaseGroupBy constructor, -qrntcompat must be 12030100 or higher.
The logical and operator (&& or .AND.) is supported and is equivalent to its Synergy counterpart. See Expressions for more information about this operator.
Discussion
Changes to the file after making the selection may not be reflected in the records retrieved, especially if a record that matches the selection criteria is updated or inserted.
If you need case-sensitive grouping of records, use Synergex.SynergyDE.Select.GroupBy. You can combine GroupBy and NoCaseGroupBy using the .AND. operator if only some fields require case insensitivity or if some fields are integer. For example,
sobj = new Select(new Sparse("*"), from, wobj, & new GroupBy(fld1).and.(new NoCaseGroupBy(fld2)))