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

Except Join don't work

Started by V i n c e n t, 14 Nov 2013 04:56:32 AM

Previous topic - Next topic

V i n c e n t

Hi,

I need to do an except join (or something similar) between 2 queries.

Query 1 (2 columns) customer for this year

customer revenue
A   500
B   200
C   400
D   500

Query 2 (2 columns) customer for past year
A 1000
B 800
D 900

What i want :
Query 3
C 400

but query 3 is :
A   500
B   200
C   400
D   500

It's probably because except is working with 2 columns from query 1 an 2, and me i want that except work only with first column ?
Can i specify the column between 2 queries , to do the except join ??
If it's not possible, can i use a join with opérator <> between my 2 queries ??

Thanks for your help, and sorry for my english.

Vince.

V i n c e n t

With Theta-join and appropriate cardinaly, it's possible ????

V i n c e n t

In SQL :

SELECT <select_list>
FROM TableA A
LEFT JOIN TableB B
ON A.Key=B.Key
WHERE B.Key IS NULL

how to do this in my case with COGNOS ??

CognosSteve

You can create a left join between the two queries by setting the cardinality the join.  Maybe try that and then do a comparison of data items in the detail filter?

V i n c e n t

ok it works .

Left join between my 2 queries (1n - 0n) and a détail filter in the final query with B.Key is null.
It's more fast than a except join.

Thanks.

Vince.

CognosSteve

Glad it worked out for you!