Re: Anyone have a trigger solution?

From: steve <E_at_E.COM>
Date: Wed, 17 Jan 2001 15:25:01 +0800
Message-ID: <1endtuz.5oj4px1doalduN%E_at_E.COM>


HI,
[Quoted] [Quoted] I was assuming that you were going to re-write the app from scratch.

[Quoted] I'm not sure if 8.0.6 will handle nested tables, it will handle nested arrays, but then you have to pre-define the size of the array.

[Quoted] I would stay away from triggers for this app.

[Quoted] I'm also having difficulty in seeing why you need:  

select count(*) into Kount
from available_dates
where site_id = my_site
and reservable_date between arrival_date and departure_date and reservation_id is null;

only to test the kount flag later,
you appear to have the same tests in the update statment. can you not just remove the above code?

[Quoted] if you can combine this into the select for update then the problem will be solved.

> I'm not sure what you mean here? Can you give me any code example?
>
> I'm using 8.0.6EE, but have never used a nested table, and I'm not sure how
> this would handle multiple reservations for the site - since a site is open
> for the season, we might have 10 or more reservations for it for the year.
> We just don't want 2 people with overlapping resevations for the site.
>
> Additionally, if it's a multi-slot per day site (ie. boating or
> backpacking), we'd want to ensure that the sum of the number of people for
> the site for that day doesn't exceed a threshold value
> (reservations_per_interval) that is stored in a lookup table.
>
> Any more assistance would be greatly appreciated:
>
> steve <E_at_E.COM> wrote in message news:1enbyd4.16bnrebm8g0cgN%E_at_E.COM...
> > Hi,
> > can you not use a nested table inside the record for the item you want
> > to allocate.
> > each time there is an allocation, enter it into the nested table, then
> > order by insertion time/date, so that the first item in always overrides
> > the later additions.
> > this would also have the advantage of showing how popular an item is,
> > and if the person at the top cancels, you can drop down 1 item.
> >
> > once the transaction is committed by both users, first come first serve.
> > let the other user know it is not available, a simple check of the
> > current details against the top item will confirm who has the item.
Received on Wed Jan 17 2001 - 08:25:01 CET

Original text of this message