• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL


  • Subject: Re: SQL
  • From: Larry Mills-Gahl <email@hidden>
  • Date: Fri, 13 Apr 2012 14:26:48 -0400


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@hidden



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@hidden> написал:
ERXEOControlUtilities.aggregateFunctionWithQualifier

Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >SQL (From: Ron X <email@hidden>)
 >Re: SQL (From: David LeBer <email@hidden>)
 >Re: SQL (From: Ron X <email@hidden>)
 >Re: SQL (From: Ramsey Gurley <email@hidden>)
 >Re: SQL (From: Ron X <email@hidden>)

  • Prev by Date: Re: [ANN] WOInject 1.0
  • Next by Date: SimpleBlog not launching
  • Previous by thread: Re: SQL
  • Next by thread: threads and GIDs and EC's … oh, my
  • Index(es):
    • Date
    • Thread