sumeetk
March 11th, 2004, 02:26 PM
I have a transaction table which contains 2 columns, Amount and Cat_id (category)
eg my table is like
Amount | Cat_id
500 | 1
300 | 1
800 | 2
400 | 2
So now ive 2 queries
select amount from transaction where category = 1;
select amount from transaction where category = 2;
I want to display the result of these 2 queries in my report.
If i try to add these queries in two seperate commands in the data environment and then add it to the report then it shows an error.
So I created 2 views cat1 and cat 2 with those queries, created a new query which takes the value from those two views and placed it on the report.
But now wen i see the report i get this
Cat_1 | Cat_2
500 | 800
300 | 800
500 | 400
300 | 400
While i want my report like this.
Cat_1 | Cat_2
500 | 800
300 | 400
Please help me guys, have to build a small program.
eg my table is like
Amount | Cat_id
500 | 1
300 | 1
800 | 2
400 | 2
So now ive 2 queries
select amount from transaction where category = 1;
select amount from transaction where category = 2;
I want to display the result of these 2 queries in my report.
If i try to add these queries in two seperate commands in the data environment and then add it to the report then it shows an error.
So I created 2 views cat1 and cat 2 with those queries, created a new query which takes the value from those two views and placed it on the report.
But now wen i see the report i get this
Cat_1 | Cat_2
500 | 800
300 | 800
500 | 400
300 | 400
While i want my report like this.
Cat_1 | Cat_2
500 | 800
300 | 400
Please help me guys, have to build a small program.