Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Union Queries and display

Status
Not open for further replies.

gmoorthy

Programmer
Jul 13, 2004
107
US
I have to run a union queries and bring them into a crosstab format.

The query does a
select on basetype,producttype,sourcesystem,dollaramount
where sourcesystem ='A'
and transaction type ='1'
Union
Select on basetype,producttype,sourcesystem,dollaramount
where sourcesystem ='B'
and transaction type = '2'

Now transaction type '1' and '2' have to be put as in one bucket called as common and i want to display as follows

productype ,dollaramount
common (1 &2 )






 
So, what's your question?

Build this in the query panel. This should be a trivial issue.

Steve Krandel
VERITAS Software
 
I am sorry for the confusion the union query should read as follows -

select on basetype,producttype,sourcesystem,dollaramount
where sourcesystem ='A'
and transaction type ='1'
Union
Select on basetype,producttype1,sourcesystem,dollaramount
where sourcesystem ='B'
and transactiontype1 = '2'

Now transaction type '1' and '2' have to be put as in one bucket called as common and i want to display as follows

type ,dollaramount
common (1 &2 )
 
If you leave Type out of the displayed data, the amount will be the sum amount accross both dimensions.

Either that or use Grouping within the report.

Steve Krandel
VERITAS Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top