I am working on the system to store appointments and recurring appointments. My schema looks like this
appointment ----------- id start end title recurring type recurring again recurring type ----------- ---- Id name
I have simplified and only supported recurring types
weekdays, weekly, 4 weekly, 52 weekly
If the recurring type is empty then that appointment is not recurring, recurring is still empty and if its empty but recurring type If there is a value, it will be repetitive indefinitely. I am trying to write an archived procedure to return all appointments and dates to a certain date range.
I'm getting the stored procedure for non-recurring meetings but I have to return the best method to repeat it is that I have done so far
Please select Appointment Appointment as Appointment (@StartDetDateTai, @EndaDetiteI), appointment, appointment Appointment Type, appointment , Appointment Start, appointment [End] from where MRM_booking is done (start> gt; = startdate and [end]
Now where should I add the iterations to be raised and For returning start and end dates for general meetings and what has changed in the selection to return the start / end dates of calculation for iters.
The best way to handle this would be great if I am using SQL Server 2005
You must periodically store each individual line. That is, you need to expand recurring dates on initial savings. Without doing this, they have to make the impossible (or very difficult) to fly to fly, when you want to see them, check conflicts, etc. This will do the same thing for all the appointments, because in reality there will be a line in all, etc. to load the table. I suggest that when a user specifies their recurring date, you choose them a real number of recurring events. When you go to save that recurring placement, expand them as individual rows in the table. You can use the FK in the appointment row of a parent and you can link them like a linked list:
Appointment ----------- ID start start Title recurring title id id id
Sample data:
id .... recurrent print id 1 .... tap 2 .... 1 3 ... 2 4 ... 3 5 .... 4
If in the middle of the recurring appointment schedule, if id = 3 is called, then they decide to cancel them, So you listen Can follow Nkla and remove the remaining id = 3,4,5.
For the expansion of dates, you can use a CTE, number table, loop, etc. If you need help doing this, just ask the keys as the regular rows in the table. To save you so that you do not need to expand each time you fly them when you need them to display or evaluate them.
Comments
Post a Comment