[V4RB] GROUP BY Recid Problems

jeb eddy jebeddy at ix.netcom.com
Fri Feb 7 07:59:21 CST 2003


>Hi Ruslan,
>
>
>--- Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:
>>  on 2/7/03 5:04 AM, Frank Schima at macsforever2002 at yahoo.com wrote:
>>  > I'm trying to do a simple 3 table join with a sum() command and 
>>a GROUP BY.
>>  > But if I
>>  > GROUP BY the Recid field of a table, then ViSQL crashes on me. 
>>Ruslan, have
>>  > you seen this
>>  > problem before? Here is a sample:
>>  >  SELECT a.Recid, a.Name, sum(c.amount) From a, b, c GROUP BY a.Recid
>>
>>  I do not remember,
>>  Please send me db with few records, and SQL to do.
>
>You can test any database and try to SELECT RecID FROM mytable GROUP 
>BY RecID on any one
>table. It crashes ViSQL.
>


Forgive my ignorance, but why would you want to do a GROUP BY on the 
primary key?  By definition, all the values are unique, so GROUP BY 
should return exactly the same set of records, right?

The system should not crash, but this GROUP BY performs no useful 
function?  Please correct me if I am misunderstanding something.

-- Jeb Eddy


More information about the Valentina mailing list