:having problem

G

Ganesh Kumar

Hi I am using :having option in query it is giving error like

"Unknown key(s): having"

plz reply me with solution

Advanced Thanks
Ganesh
 
R

Rick DeNatale

[Note: parts of this message were removed to make it a legal post.]

Hi I am using :having option in query it is giving error like

"Unknown key(s): having"

plz reply me with solution
First, off, I'm guessing that this is a question about ActiveRecord,
probably in the context of Rails. In general the rails group does better
fielding these kind of queries than ruby-lang which focuses on the ruby
language, and not so much on rails.

That said.

ActiveRecordBase#find does not have a :having option. It's been proposed,
but never acted upon. Instead you should add the HAVING clause to the
value of the :group option per the reply by Josh Susser in this thread:

http://www.ruby-forum.com/topic/76042

I think that this makes sense, since the HAVING clause must be used in
conjunction with a GROUP BY clause in SQL

As far as I know, nothing came of making a plugin to add a having option
which was mentioned at the end of this 30 something month old thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,965
Members
47,511
Latest member
svareza

Latest Threads

Top