Hello lovely Tessitura people,
I'm attempting to write a View which will pull availability data from TW_WEB_PRICES, however this table doesn't include all the performances which should be available online. Is this expected behaviour?
I can't seem to work out why certain performances are missing, and was wondering how often this table is populated and what triggers it's population? (Is that the right terminology? I'm quite new to this SQL stuff...)
Many thanks for your help
GraemeYoung Vic Theatre
Hi Graeme,
Good day.
Is this TW_WEB_PRICES a custom table? because I couldn't find it in our SQL.
have fun
Ben
Hi Ben, Thanks for that.
I'm pretty sure it isn't a custom table. In fact, the reason you couldn't find it is cos it's called TW_GET_PRICES... Silly me
Thanks again
Grae
TW_GET_PRICES is populated each time a call for performance or package pricing is made from the web. It is filled with the valid pricing as of the time the order is made for the MOS, source_no, etc. It is a "work" table (thus the TW prefix) and therefore its contents are temporary. It is used to pass the pricing information between several stored procedures, using the spid field to identify which information is for the current session.
So, unfortunately, building views or reports from this information would not be very useful.
David
TW_GET_PRICES doesn't automatically hold the price info for all performances, it's a worktable that's used on a session-by-session basis to hold the results of the WP_GET_PRICES, WP_GET_PRICES_PERF, WP_GET_PRICES_PKG or WP_NFSPKG_DETAIL procedures.
In other words, it's only populated when a web customer is presented with pricing information on a performance or package. Even then, if a new process comes along using the same spid (server process id #) as a previous request, the old data is cleared out for that spid in favor of the new request.
edit: or, in other words, what David said :)
Hi Grae,
If you can check out these stored procedures, you can create the rest of records in the table.
or through following tables:
TX_PERF_PMAP, ---(this is the detail table, has all performances, but doesn't have price)
T_SUBPRICE, ---(this table keeps price info)
TR_PRICE_TYPE, ---(a few pmap_no (s) tied up together become a price type, this is the lookup table)
T_PMAP, ---(this is lookup table too, also link to GL)
you can build your own price list from TX_PERF_PMAP.
SELECT TX_PERF_PMAP.perf_no, TX_PERF_PMAP.price_type, TX_PERF_PMAP.start_dt, TX_PERF_PMAP.pmap_no, TX_PERF_PMAP.design_no, TX_PERF_PMAP.end_dt, TX_PERF_PMAP.gl_hold_no, TX_PERF_PMAP.gl_perf_realize_no, TX_PERF_PMAP.base_ind, TX_PERF_PMAP.price_category, T_SUBPRICE.price, T_SUBPRICE.min_price, T_SUBPRICE.zone_no, T_SUBPRICE.zmap_noFROM TX_PERF_PMAP INNER JOINT_SUBPRICE ON TX_PERF_PMAP.pmap_no = T_SUBPRICE.pmap_noWHERE (TX_PERF_PMAP.perf_no = @your_perf_no)ORDER BY TX_PERF_PMAP.price_type, T_SUBPRICE.zmap_no, T_SUBPRICE.zone_no, TX_PERF_PMAP.price_category
You can compare the price result between SQL script and Tessitura ticket setup screen.
if you remove "WHERE (TX_PERF_PMAP.perf_no = @your_perf_no)", you have basic info for view .
ben