473,508 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scheduking query

Table t2, below, records the Date on which an Actor performs a Role.
Rules:
1. perform 1 role per date
2. perform each role before starting again

B is the next Actor in line to perform Role=1 on Date=2003-10-20

Is there a query that will select B and exclude A & C since they have
already performed role 1.

The data is simplified - there are approximately 20 roles and 60 actors

Any help would be greatly appreciated
Dave

roleID,DATES,actorID
1,2003-10-06,A
2,2003-10-06,B
3,2003-10-06,C
1,2003-10-13,C
2,2003-10-13,A
3,2003-10-13,B
Jul 19 '05 #1
1 1428
BDR
You need a program, not just a query...

Or if you could supply a sample `desired` output format it would be
easier than deciphering a bonus question on an sql quiz :-)

ie; You've supplied the source table, now tell us what it should look
like on output. (you should also try searching for the word `wizard` on
mysql.com - seriously)
Dave wrote:
Table t2, below, records the Date on which an Actor performs a Role.
Rules:
1. perform 1 role per date
2. perform each role before starting again

B is the next Actor in line to perform Role=1 on Date=2003-10-20

Is there a query that will select B and exclude A & C since they have
already performed role 1.

The data is simplified - there are approximately 20 roles and 60 actors

Any help would be greatly appreciated
Dave

roleID,DATES,actorID
1,2003-10-06,A
2,2003-10-06,B
3,2003-10-06,C
1,2003-10-13,C
2,2003-10-13,A
3,2003-10-13,B


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3413
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
29
2477
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
1
1321
by: Dave | last post by:
Table t2, below, records the Date on which an Actor performs a Role. Rules: 1. perform 1 role per date 2. perform each role before starting again B is the next Actor in line to perform Role=1...
9
3109
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
3
5372
by: Harvey | last post by:
Hi, I try to write an asp query form that lets client search any text-string and display all pages in my web server that contain the text. I have IIS 6.0 on a server 2003. The MSDN site says...
4
2133
by: Diamondback | last post by:
I have two tables, WIDGETS and VERSIONS. The WIDGETS table has descriptive information about the widgets while the VERSIONS table contains IDs relating to different iterations of those widgets...
14
3853
by: Dave Thomas | last post by:
If I have a table set up like this: Name | VARCHAR Email | VARCHAR Age | TINYINT | NULL (Default: NULL) And I want the user to enter his or her name, email, and age - but AGE is optional. ...
2
18684
by: Dom | last post by:
I need to run a query based on a query in Access. The second query has a number of conditions which all work well, but there is one more contition I need to set to make it run properly. the...
5
10580
by: Ryan Hubbard | last post by:
Is it possible to get the recordset from an open query window? So you run the query. The window is open. Can vba retrieve this data?
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.