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.
With Theta-join and appropriate cardinaly, it's possible ????
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 ??
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?
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.
Glad it worked out for you!