Duncan,
In that case I'm a little stumped.
If I just wanted to do it as an sql statement it would look like this:
Select Name, sum(TotalHours), Year +
From YourTable +
Group By Name, Year +
Having Sum(TotalHours) < 100 +
Where year in (2003, 2004)
If you just wanted to return the names you could also do this, I think:
Select Name + [this could be -- Name, sum(TotalHours) -- also]
from YourTable +
Group By Name +
Having Sum(TotalHours) < 100 +
Where year in (2003, 2004)
But I don't know how, or if, you can this in the object manager.
You could, I'm pretty sure, do this simply at the the R>:
Output Printer
Print MyReport +
Order by Name +
Where Name In +
(Select Name +
From YourTable +
Group By Name +
Having Sum(TotalHours) < 100 +
Where year in (2003, 2004))
Best of Luck!
Ben
Duncan Walker wrote:
Thanks,
But I am actually trying to print the report showing only those people who
have done less than 100 hours is both years not just one. If I run your
query I get those with less than 100 hours in either year or both. All I
need is both years.
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Petersen
Sent: Sunday, July 30, 2006 1:27 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: RBase 6.5++ Query structure
Duncan,
You can change your original by replacing
the and with "or". The cannot be 2003 AND
2004 at the same time <g>.
(year =2003 and totalhours <100) OR
(year=2004and totalhours <100)
I don't use the object manager, but the statement would be
better written as:
Where totalhours < 100 and year in (2003, 2004)
Ben
Duncan Walker wrote:
I have a table holds the following information
- the volunteers name
- The hours volunteered for the year by each volunteer.
(This info is held for multiple years ie 2001, 2002, 2003 etc).
I am using the Object Manager- Reports and the Where Builder and am
trying
to create a query that will display all volunteers who have done
less than
50 hours, each year, over a number of years ie 2003 and 2004. I am
having a
problem as I'm not very good at these compound queries. I had tried
the
following but got back no rows. (year =2003 and totalhours <100) and
(year=2004and totalhours <100).
I would appreciate any help.
Thanks
Duncan
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================