Hi CK,
I've been playing around with your code - it's great and works perfectly. Unfortunately when I adapt the query for the database I'm working on (which has a couple of other table dependencies and hundreds of thousands of rows) on performance is very slow (well over ten minutes). I'm playing around with variations on the code but so far I've not had any success. I think it's back to the drawing board - maybe to try and establish...
User Profile
Collapse
-
Hi CK. No, we only have a column with the available seats. When a seat is booked the record is removed from this table and inserted into a new (shopping cart) table....Leave a comment:
-
Hi Delerna.
Many thanks for your response. Unfortunately these queries won't always return X consecutive rows. I need to find X consecutive rows (if they exist). In the data I gave, seats A3 and A4 have been booked and so are no longer available. If the seats are not in the table then they have been booked and cannot be offered to another customer. (This can sometimes happen with a booking system when customers attempt to book...Leave a comment:
-
How to find X consecutive (integer) values in a table column
Hi all,
I hope someone can help me out. I need to return the best available seats subject to the constraint that the seats are side by side (or return X consecutive records from a table column where the values are integers). I can do this programmaticall y (using code and stored procedures), but it's not a neat solution and there are also performance issues.
Returning the best available X number of seats is very straightforward ....
No activity results to display
Show More
Leave a comment: