Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Question

Re: SQL Question

From: Daniel Fink <Daniel.Fink_at_Sun.COM>
Date: Mon, 03 May 2004 13:35:19 -0600
Message-id: <40969EF7.FE4C840E@sun.com>


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



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US