I'm not sure how it happens, but we sometimes get seats that are shown as unavailable, and are associated with an order number that does not exist.
The first time I had to fix this, it took hours and I broke as much as I fixed. I had the issue again today, and I was able to free the seat using this:
update tx_perf_seatset order_no = null, seat_status = 0 where pkg_no = 0 and perf_no = 4719 and seat_no = 9207
The last line is a modifed version of what is returned when right-clicking on the seat and selecting "Database Seat Number".
I hope someone else finds this useful.
David -
You also might want to look into the SQL procedure TP_CHECK_SEAT_STATUS. This can be run nightly with fix_problems as 'Y' and I've found that 99% of the time it finds and fixes those rogue seats that have been orphaned.
We have ours running on a nightly basis, and I have run it on the fly to find and fix orphaned seats as well.
HTH,
Heather
Seattle Repertory Theatre