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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 ordering slots

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-07-08 : 11:57:12
Ryan writes "Hello! I read all your posts and I must say that I am really impressed with your site. This is really a great web site.

I need help on the project that we have. I am really having difficulty because I am a newbie in SQL Server 2000. But I must say that I learned a lot after a number of visit to your great web site!

I need help on this problem. I have a table that has the following fields.

-----------------------------------------------------------------
AutoNumber | EmpNumber | Choice | Schedule | Seniority | Slots
-----------------------------------------------------------------

My goal is to get the result based from a LAN based ASP page that we have. To get the result the system should do something like this:

1. The one with the highest Seniority should be considered first. The highest seniority is 1 and the lowest is N. N depends on the number of employee.
2. The availability of the schedule is determined by the number of slots. If employee 1 with seniority 1 got schedule A the system should deduct 1 on the slots available for schedule A. And so on until the result is complete.

After reading examples from your web site, I understand that I need to set some of my values as parameters and I am thinking about using a comma delimited string (is this correct).

During the loop process I can place the schedules and the slots in a temp table and the update this as the loops goes on.

Thank you for taking time to read my question."

X002548
Not Just a Number

15586 Posts

Posted - 2004-07-08 : 12:19:25
Do you have a schedule table? Is there something that equates schedule A as being the first schedule, B as the second and so on?



Brett

8-)
Go to Top of Page

Apodyukay
Starting Member

2 Posts

Posted - 2004-07-12 : 01:19:27
[quote]Originally posted by X002548

Do you have a schedule table? Is there something that equates schedule A as being the first schedule, B as the second and so on?

---------------------------------

Yup! I have a schedules table where you can check on the slots available for the schedule.

--student--
Go to Top of Page

Apodyukay
Starting Member

2 Posts

Posted - 2004-07-12 : 04:44:22
Just a follow-up ...

Sorting of the result should be done by seniority and then check if the chosen schedule is available based on the slots.

--student--
Go to Top of Page
   

- Advertisement -