FIXED: [V4RB] GROUP BY Recid Problems

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Feb 19 17:58:40 CST 2003


on 2/7/03 6:33 PM, Frank Schima at macsforever2002 at yahoo.com wrote:

> It makes no sense for a single table, I was just showing Ruslan an easy way to
> see and
> debug the problem. However when doing multi-table JOINs, it can be very
> useful. 
> 
> Let me try to give you an example off the top of my head:
> 
> Table 1 = Student holds Students
> Table 2 = Class contains Classes
> Table 3 = StudentClass and is a M:M table linking Students to Classes
> 
> The Student table has a Name field
> The Class table has a Name field too.
> The StudentClass table links to the other 2 tables with Object Pointers.
> 
> How many students are in every Class?
> 
>  SELECT Class.Recid, count(*)
>  FROM Class, StudentClass
>  GROUP By Class.Recid
> 
> Of course I could do this from the StudentClass table directly, but what if I
> want to
> also print out the Name of the Class and the Recid?
> 
>  SELECT Class.Recid, Class.Name, count(*)
>  FROM Class, StudentClass
>  GROUP BY Class.Recid, Class.Name
> 
> In any event, Valentina should not crash on any SQL statement, whether useful
> or not! :^)
> 

Crash is fixed.

I will think if I can add now grouping on RecID

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list