471,108 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,108 software developers and data experts.

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 1382
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jaysonsch | last post: by
1 post views Thread by Dave | last post: by
9 posts views Thread by netpurpose | last post: by
3 posts views Thread by Harvey | last post: by
4 posts views Thread by Diamondback | last post: by
14 posts views Thread by Dave Thomas | last post: by
5 posts views Thread by Ryan Hubbard | last post: by

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.