If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

can i create join on 2 union queries?

Started by everlearner, 29 Oct 2012 08:26:21 AM

Previous topic - Next topic

everlearner

Hi gurus,

i have 2 union queries, can i join those two?
if yes what are the rules i have to follow?
thanks in adv

tjohnson3050

I assume you mean you have two queries, each of which are the result of unioning other queries together?

All you need is to have fields in each of those queries with common data types to join on.

everlearner

yes john,

the two queries are results of union  other queries.
here in the detail... q1,q2,...q6
q3 is union of q1 & q2
q6 is union of q4 & q5

now my requirement is to be join q3 & q6.
i have created the join between q3,q6 by sNum.

after the join when i validate the report am getting the following errors...

1)UDA-SQL-0353 An error was detected while processing the SQL request.
2)RQP-DEF-0177 An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'.

please do needful to resolve this problem..
thanks in adv

mtirpude

#3
Hi,

You can join the two queries. There is no issue in joining the unioned queries. Lets say your query is Q7 (joined of q3 and q6)
Need below inputs -
1. Your report is not validating and throwing error. Did you checked tabular data of Q7? Is tabular data coming back for query Q7.
2. If Q7 tabular data is throwing errors, please check query q3 is also returning tabular data. If it is returning, then check if query q6 is returning tabular data.
3. As per my thoughts, this error might be occuring in either query q3 and q6. If the error occuring in q3, then check that q1 and q2 should have query items in same order (for unioning queries, it is compulsory that all the query items should be in same order). Same with q4 and q5.

Regards,
Manish Tirpude | 919673990644