Hi,
Data is extracted from a single table. On giving query on Trantype='IS' I get this output
Ref KeyRef Product Quantity TranType
I95 Q1 PF1 9 IS
I95 Q1 PF2 12 IS
I95 Q1 PF3 6 IS
On giving query on Trantype='PR' I get this output
Ref KeyRef Product Quantity TranType
P63 I95 PF102 2 PR
P63 I95 PF202 3 PR
P63 I95 PF302 2 PR
P81 I95 PF102 5 PR
P81 I95 PF202 4 PR
Is it possible using a single query to merge these 2 outputs(queries) and get an output as this :
Ref KeyRef Product Quantity Ref Product Quantity
I95 Q1 PF1 9 P63 PF102 2
I95 Q1 PF2 12 P63 PF202 3
I95 Q1 PF3 6 P63 PF302 2
I95 - - - P81 PF102 5
I95 - - - P81 PF202 4
The join is on Ref and KeyRef in the same table. A report is finally generated using this query which will show the total of quantities for trantype 'IS' and 'PR'.
Data is extracted from a single table. On giving query on Trantype='IS' I get this output
Ref KeyRef Product Quantity TranType
I95 Q1 PF1 9 IS
I95 Q1 PF2 12 IS
I95 Q1 PF3 6 IS
On giving query on Trantype='PR' I get this output
Ref KeyRef Product Quantity TranType
P63 I95 PF102 2 PR
P63 I95 PF202 3 PR
P63 I95 PF302 2 PR
P81 I95 PF102 5 PR
P81 I95 PF202 4 PR
Is it possible using a single query to merge these 2 outputs(queries) and get an output as this :
Ref KeyRef Product Quantity Ref Product Quantity
I95 Q1 PF1 9 P63 PF102 2
I95 Q1 PF2 12 P63 PF202 3
I95 Q1 PF3 6 P63 PF302 2
I95 - - - P81 PF102 5
I95 - - - P81 PF202 4
The join is on Ref and KeyRef in the same table. A report is finally generated using this query which will show the total of quantities for trantype 'IS' and 'PR'.