Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Question
Deen,
I've been accused of being creative with sql, but I don't think any amount of creativity will help on this one. I think you'll need to look at either pl/sql or using temporary tables to generate possible schedules for a given starting class, then another set of tables for the possible schedules for the first two starting classes, then another...well, you see where this leads.
You have so many permutations to deal with and perhaps even recursion that I don't see how just sql will work.
Daniel
deen dayal wrote:
> NUMB COURSE START_NEW END_NEW
> ==== ==== ======= =================== ===================
> 1 1191 EDU*140 2004-05-01 09:00:00 2004-05-01 12:00:00
snip
> 19 1221 ENG*011 2004-05-01 11:15:00 2004-05-01 12:10:00
>
> what I need is a SQL which can give me non overlapping course schedules
> for a given set of courses, giving alphabetical priority to courses.
>
> For example for a given set of courses EDU*140, ENG*010, ENG*011
>
> ENG*010 2004-05-01 08:00:00 2004-05-01 08:55:00
> EDU*140 2004-05-01 09:00:00 2004-05-01 12:00:00
> ENG*010 2004-05-01 12:45:00 2004-05-01 14:10:00
> ENG*010 2004-05-01 19:00:00 2004-05-01 22:15:00
>
> I can not come up with any ideas, can some body please help?
>
> Thanks for any ideas/help
>
> Deen
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon May 03 2004 - 14:41:34 CDT
![]() |
![]() |