Hello!
I know you guys may have already answered a similar question, but I was unable to search my way to an answer on this forum, so please bear with me here
I have 3 tables, structured as follows:
Table 1: Products
Product Code - PK
Product Description
Table 2: Stores
Store Code - PK
Store Description
Table 3: StoredItems
Product Code - PK
Store Code - PK
Quantity Stored
Where 'Table 3' is the bridge table in a many-to-many relationship. 'Table 3' also holds the quantities of products stored in each store. Here is a sample of the data stored in this table:
ProdCode - StoreCode - Qty
Item A - Store 1 - 10
Item A - Store 2 - 15
Item A - Store 3 - 12
Item B - Store 1 - 8
Item B - Store 2 - 7
Item B - Store 3 - 9
Item C - Store 1 - 11
Item C - Store 2 - 19
Item C - Store 3 - 18
Now, I would like to display read-only information in a grid as follows:
ProdCode - Store 1 - Store 2 - Store 3
Item A - 10 - 15 - 12
Item B - 8 - 7 - 9
Item C - 11 - 19 - 18
Now this seems easy enough using a PIVOT (or CASE) statement in a stored procedure or view, but this is NOT where my dilemma is. My problem is when I add a new 'Store' then I would need to add a new column in my query. How would I dynamically represent that using LLBL?
I hope I made myself clear.
Thanks in advance.