Note that there are some explanatory texts on larger screens.

plurals
  1. POSql Query To get data
    text
    copied!<p>i have a table called DrTimings ,in which Doctors time for each day is this.</p> <pre><code>DrID(int identity) StartTime(DateTime) EndTime(DateTime) 1 3/31/2009 8:00:00 AM 3/31/2009 10:30:00 AM </code></pre> <p>I have another table called TimeList which contain 3 fields</p> <pre><code>SlotID SlotStartTime(varchar) SlotEndTime(varchar) 1 8:00AM 8:15AM 2 8:15AM 8:30AM 3 8:30AM 8:45AM </code></pre> <p>and goes on till 7:00PM </p> <p>I have another table DrDutyDetails in which DrTiming is set for whole month like this.</p> <pre><code>DrID StartTime EndTime DateOfAllocation 1 4/5/2009 8:00:00 AM 4/5/2009 9:30:00 AM 4/5/2009 12:00:00 AM 2 4/12/2009 8:00:00 AM 4/12/2009 9:30:00 AM 4/12/2009 12:00:00 AM likewise </code></pre> <p>I have another table called AppointmentSchedule which gets filled when patient requests appointment</p> <pre><code>AppointmentID SlotID AppointmentDate 1 1 4/5/2009 2 3 4/12/2009 </code></pre> <p>i have a appointment schedule form in which i selects DrID and Appointment date.Then slots corresponding to date that has not been in Appointmentschedule,but slots should be in between starttime and endtime that in DrTimings and in TimeSlots should get filled in a dropdownlist.I need a query to implement this. for eg:If Patient enters '4/5/2009' Then slots other than 1 and 3 but biw DrTimings i want to get.</p> <p>Similarly i want to search by time.Means if Patient enters any time b/w DrTimings for eg:8:30AM,Then available first date has to be displayed in textbox</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload