Hi,I am having two pivot tables which I am combining using union. The first table gives me records for first 3 columns and second query gives me records for remaining columns by checking maximum ID of the column filled by first query. But these two records are shown as two different rows in result set. I want to have a single record/row in output set which will combine these two rows with similar data in it. Can someone help me with this?
For e.g.: First query returns results such as:
Column1 Column2 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
a c1 1 1 1 0 0 0 0 0 0 0 0 0 - o/p from 1st query
a c1 0 0 0 1 1 1 1 1 1 1 0 0 - o/p from 2nd query
a c2 1 1 1 0 0 0 0 0 0 0 0 0 - o/p from 1st query
I want to have a result set as below:
Column1 Column2 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
a c1 1 1 1 1 1 1 1 1 1 1 0 0
a c2 1 1 1 0 0 0 0 0 0 0 0 0