Hi bruce,
You are absolutely right. Rather making a group I should have used "order
by" thats too with a limit rownum <=50

Thanks a ton for the pointer.

-Dev

bsnyder wrote:
> 
> On 10/3/07, DEBANJAN <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>> I want to see the list of CIRCUIT_ID and EVENT_TYPE from
>> ESB_CV_ORDER_EVENT
>> table.
>>
>> Now when i execute this query-
>> select ESB_CV_ORDER_EVENT.CIRCUIT_ID, ESB_CV_ORDER_EVENT.EVENT_TYPE from
>> ESB_CV_ORDER_EVENT
>>
>> I observe the correct output.
>> Now when i try to group the output by ESB_CV_ORDER_EVENT.EVENT_TYPE and
>> execute the SQL query-
>> select ESB_CV_ORDER_EVENT.CIRCUIT_ID, ESB_CV_ORDER_EVENT.EVENT_TYPE from
>> ESB_CV_ORDER_EVENT group by ESB_CV_ORDER_EVENT.EVENT_TYPE
>>
>> this gives me an error.
>>
>> Can anyone help me out?
> 
> What database are you using? What error are you receiving? Please show
> the table schema.
> 
> I can take a guess if it's Oracle that you haven't  listed all
> non-aggregate columns being selected in the group by clause, but
> that's a complete guess.
> 
> Are you sure you want group by and not order by?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)[EMAIL PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> Castor - http://castor.org/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/group-by-SQL-query-help-tf4564344s12049.html#a13040741
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to