I&#039ve got a small issue with coding a SQL statement for an application that dispenses raffle tickets.<BR><BR>We&#039ve got 200,000 tickets to sell, but obviously we do not want to sell the same ticket twice. Likewise we want to make sure that the full 200, tickets are sold.<BR><BR>The issue arises when a shopper orders 20 tickets, we flag them as held, and write a log to a tracking_table.<BR><BR>Anyways, now the shopper enters the checkout phase, and, low and behold they have &#039insufficient funds&#039, or, worse still, they just kinda&#039 order them and never checkout.<BR><BR>Now, we know Session_OnEnd is a bit buggy, so how do I ensure that these tickets are freed up for re-sale.