Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Re: dbase search


Message #1 by "Bliven, Corinne" <Corinne.Bliven@o...> on Mon, 1 Jul 2002 15:42:02 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C22137.5F4C50B0
Content-Type: text/plain;
	charset="iso-8859-1"

Hi Charles,
When using the GROUP BY clause you have to make sure that the fields you are
grouping contain either the same values or you have to use function like
max, min or whatever apply to your querry in order to allow the grouping of
certain fields. It really depends on your querry and the values contained in
your table.
Hope that help (I will have to know more about your data to tell you
specifically what makes this querry fail).
CNB


-----Original Message-----
From: charles [mailto:charles@l...]
Sent: Sunday, June 30, 2002 6:17 PM
To: sql language
Subject: [sql_language] Re: dbase search


I have been using aquery to select results (stored procedure) It
successfully produced the best performance for an individual. I have now
been asked to display other fields (date,meeting) using the stored procedure
and adding new fields brings up all results for the athlete- i.e it looks at
athlete performance+meet+date.

How do i call up athlete etc plus date and meeting , but limit to best
performance(minOfPerf)
Query I run

PARAMETERS Class Text ( 255 ), Ranking Long;
SELECT Min(outdoor.Perf) AS MinOfPerf, outdoor.Athfnam, outdoor.Athsurnam,
outdoor.Club, outdoor.Date, outdoor.Meeting
FROM outdoor
WHERE (((outdoor.Event)='U13b 100m'))
GROUP BY outdoor.Athfnam, outdoor.Athsurnam, outdoor.Club, outdoor.Date,
outdoor.Meeting
ORDER BY Min(outdoor.Perf);

If I ommit    outdoor.Date, outdoor.Meeting it works fine .

Regards

Charles




  Return to Index