It may not be the level of database independence that ERXEOControlUtilities
offers, but if your dealing with SQL for the foreseeable future it should be
pretty safe to do something like:
EOUtilities.rawRowsForSQL(ERXEC.newEditingContext(), "MyModelName", "SELECT
COUNT(somefield), SUM(somefield) FROM sometable WHERE somefield IS NOT NULL" ,
new String[] {"count", "sum"}) ;
Of course I have no idea what the specifics of your query dictate and this may
be too simple to achieve your goal, but if you have a clear idea of the sql
that you need, you may be able to see how a structure of qualifiers can be
arranged to satisfy your need.
Larry Mills-Gahl
[email protected]
On Apr 12, 2012, at 4:38 AM, Ron X wrote:
> but how can i do COUNT() and SUM() in ONE query?
> aggregateFunctionWithQualifier - name of the function - just one (count/sum),
> but i need two (count & sum)
>
>
> 11 апреля 2012 г. 19:17 пользователь Ramsey Gurley <[email protected]>
> написал:
> ERXEOControlUtilities.aggregateFunctionWithQualifier
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/lmg%40webfarm.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]