Subject Re: [ib-support] Add a column to a table via stored proc
Author Svein Erling Tysvaer
Raymonds idea is brilliant. Trigger to update the item for each day
whenever a reservation is made with a descending index on (item, day) and
then you simply do

SELECT MAX(<CountColumn>)
FROM <CountTable>
WHERE ITEM = :Item
AND <DateColumn> BETWEEN :FromDate AND :ToDate

to get a very quick reply to your original question. If you allow items to
be delived the same day as they are handed in, you could even use 0.5 for
the from date and to date to maximize the utilisation of each item.

I don't know whether it is normal to not see your own replies, when I used
the Atkin server some time ago I noticed that I didn't see emails from
certain people, only replies to what they had written. But I have not had
that kind of problem when using yahoogroups directly.

Set

At 09:01 02.10.2002 +0100, you wrote:
>Thanks Raymond that has set my mind on another track. A table of counts is
>exactly what I was doing. But it would have to have 500 different items on
>each of 200 days. So I was thinking in terms of a matrix, but I suppose it
>could be a linear table of 100000 records one for each item for each day
>ahead.
>I shall have to think further.
>[By the way I never see my own messages in this group, only the replies, is
>that normal ?]