I have the following UNION that combines three tables. The problem is it is missing a couple of records and I have no clue why. Any help would be appreciated.
SELECT tb_item_received_detail.ird_item, tb_item_received_detail.ird_quantity
FROM tb_item_received_detail
UNION (SELECT ib_index, ib_qty from tb_item_beginning_balance)
UNION (SELECT a_item, a_qty FROM tb_adjustment);
Currently there is 5 records in tb_item_received_detail for item 1 and another 4 for Item 2.
In tb_adjustment I have only 1 record and that is for item 1.
I have some data in tb_item_beginning_balance but not for item 1 or 2. The items in this table currently are not in any other table.
When I run the query I only get 5 records for Item 1 and 3 records for Item 2. I should be getting 6 and 4 respectively.
Help Please
SELECT tb_item_received_detail.ird_item, tb_item_received_detail.ird_quantity
FROM tb_item_received_detail
UNION (SELECT ib_index, ib_qty from tb_item_beginning_balance)
UNION (SELECT a_item, a_qty FROM tb_adjustment);
Currently there is 5 records in tb_item_received_detail for item 1 and another 4 for Item 2.
In tb_adjustment I have only 1 record and that is for item 1.
I have some data in tb_item_beginning_balance but not for item 1 or 2. The items in this table currently are not in any other table.
When I run the query I only get 5 records for Item 1 and 3 records for Item 2. I should be getting 6 and 4 respectively.
Help Please