dear sir you are genius, you are doing great.... this is my question? what if we have two table having same columns name like; item_id,item_name,item_qty,item_price but the first table is our purchased items the second table is our sold items. that is the different between the two table. if I want to make an inventry: I use UNION All like the following: select item_id,item_name,item_qty,item_price from first_tbl UNION ALL select item_id,item_name,item_qty,item_price from second_tbl I just out a negative sign(-) infront of item_price of second_tbl then I use Aggregate Query to find the inventry, of number of Item it is still in stock. is that right thank you for your reply
I think this maybe can work, but in my opinion would not be the best solution. There is no need to change data. Make a query A for sum of purchased, then query B for sum of sold. Then Select from query A left joining query B. You can then add fields for A - B where you can actually see how much came in and how much went out in addition to the final total. Interesting scenario!
Thanks! This came in handy. I was trying to figure out how a union query work based on another coworker's efforts.
Glad it was helpful! Cheers
Can you do this with linked tables?
Yes you can!
dear sir you are genius, you are doing great....
this is my question?
what if we have two table having same columns name like;
item_id,item_name,item_qty,item_price
but the first table is our purchased items the second table is our sold items.
that is the different between the two table.
if I want to make an inventry:
I use UNION All like the following:
select item_id,item_name,item_qty,item_price from first_tbl
UNION ALL
select item_id,item_name,item_qty,item_price from second_tbl
I just out a negative sign(-) infront of item_price of second_tbl
then I use Aggregate Query to find the inventry, of number of Item
it is still in stock.
is that right
thank you for your reply
I think this maybe can work, but in my opinion would not be the best solution. There is no need to change data. Make a query A for sum of purchased, then query B for sum of sold. Then Select from query A left joining query B. You can then add fields for A - B where you can actually see how much came in and how much went out in addition to the final total. Interesting scenario!
Access Level Mastery: Asian
Commenting for the algorithm.
Thanks!
are you still alive ?
just asking 😊
Thanks for asking! Still here :-) Took a little holiday so I have not posted much over the past weeks.