one way to go would be by adding the field Price (either 1 or 2) to table1 and then drop Tables 2 and 3 if these tables have no other purpose than to provide the Price.
Does this work for you?
If so here is a way to do it
// load tables 2 and 3 as mapping tables
mapping load key1&key2,
mapping load key1,
applymap('mapPrice1',key1&key2,applymap('mapPrice2',key1)) as price
hope this helps
when you do a mapping load the data from the original load is not stored in the qvw document.
The "mapping" keyword before the load causes a temporary table - which exists for the duration of the script run - to be created. these tables always have just the two columns.
If you need information from the tables 2 and 3 - such as your price list - you can load them as ordinary tables. You can do this prior to creating the mapping table (preferable) as you have only to read your external Data source once.
You would then create your mapping table with code as follows
load x, y
You probably can find a solution whereby you find your price dynamically - as opposed to my solution which has added the correct price to table1. The advantage of doing it in the script is to make all your expressions much simpler, which is helpful for performance and I'd argue future maintenance.
hope this is clear. If not don't hesitate.