using UPDATE with GROUP By

Ivan Smahin ivan_smahin at paradigmasoft.com
Mon Jun 21 13:18:32 CDT 2010


Hello Bart,

Monday, June 21, 2010, 7:45:15 PM, you wrote:

> Hi Ivan

> this is interesting. So you can do

>>> select
>>>    GROUP_CONCAT(RecID),
>>>    d_address_LineNumber,
>>>    d_address_clients_ref,
>>>    count(d_address_clients_ref) as SomeName
>>> from
>>>    data_address
>>> group by
>>>    d_address_LineNumber
>>>    d_address_clients_ref
>>> having
>>>    SomeName = 2



> without having to write in the group by part the recid ? How come ?
> It was my understanding that any field used in the select had to be in the group by part ?

It comes as GROUP_CONCAT(RecID) - not just a RecID.
GROUP_CONCAT  is aggregative function - so you should not mention it in
"group by"


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list