Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 confuse of conditioning

Author  Topic 

wormz666
Posting Yak Master

110 Posts

Posted - 2010-03-04 : 14:37:25

hello everyone



i have a table schedule and s_taken and subject and sec_subject
my primary concern
can i query???

in my table schedule

i have s_day where rule is Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Monday And Wednesday,Tuesday And Thursday, Monday To Friday

and a field time_start and time_end, subjcode

in my table s_taken is where the subject i use to not to filter

and in table subject

subjcode and requi

requi field function is to verify my subject if i am qualified to take it.........

sec_subj

field s_sched, this is where i get my regular subject


i want a query that will suggest me the schedule that will not be conflict with my regular schedule, if i will add some subject....











finding the truth
making a maze on my mind....

wormz666
Posting Yak Master

110 Posts

Posted - 2010-03-04 : 14:56:03
you might be confuse let say assume this is the table

schedule
schedid day timein timeend subjcode
-----------------------------------------------
1 monday 8:00 am 9:00 AM 10:00 AM sts1
2 monday to friday 8:30 am 9:00 AM 10:00 AM fsf1
3 monday to friday 8:00 am 9:00 AM 10:00 AM sts2
4 monday 8:30 am 9:00 AM 10:00 AM fsf2

subject
subjcode requi
-----------------------------------
sts 1
sts 2 sts1
fsf 1
fsf 2

s_taken
s_id subjcode
-------------------------------------
1 sts1

sec_subj
sec_s_id subjcode room schedid
------------------------------
1 sts2 2 3
2 fsf2 2 4
3 sts1 1 1
4 fsf1 1 2


assume that there are lots of record....



finding the truth
making a maze on my mind....
Go to Top of Page
   

- Advertisement -