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.
| Author |
Topic |
|
asifbhura
Posting Yak Master
165 Posts |
Posted - 2010-10-05 : 07:09:32
|
| HelloI have two table 1.CourseRegistrationcolumn name: Userid, courseno,roomname2.coursecolumn name: coursestartdate,courseenddate,courseno etc...I want that, User cannot register to course if he already registered in between dates of other coursemeansI want like,if user registers for course,for example coursename: sql serverstartdate: 10/10/2010end date:10/11/2010after registration for this courseif hwe tries to register for another course which startdate or end date must not be inbetween 10/10/2010 and 10/11/2010Regards, |
|
|
kunal.mehta
Yak Posting Veteran
83 Posts |
Posted - 2010-10-06 : 02:48:26
|
| u need to check if the record exists for the same user in the period specified and if the rowcount in the select query is more than 0 throw exception from the SP |
 |
|
|
|
|
|