on 05-21-2009 8:57 PM
Can the Universe do conditional join? Can you use conditional statements when editing a join expression? i.e. If (condition; TableA.columnA=TableB.columnA; TableA.columnA=TableB.columnB)
Thanks,
Jimmy
Edited by: Jimmy on May 21, 2009 9:58 PM
Hi Jimmy,
You can do complex joins, by editing them in the join window.
for instance:
(
(tableA.columnC="test" AND tableA.columnA=tableB.columnA)
OR
(tableA.columnC<>"test" AND tableA.columnA=tableB.columnB)
)
You need to set the cadinality first changing this or the selected columns will reset you complex join.
Regards
Alan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it depends on what your underlying database supports.
I noticed a mistake in my previous sample, as this is the same as an If statement
(
(tableA.columnC="test" AND tableA.columnA=tableB.columnA)
OR
(tableA.columnC != "test" AND tableA.columnA=tableB.columnB)
)
The above code is the same as
if tableA.columnC="test" then
tableA.columnA=tableB.columnA
else
tableA.columnA=tableB.columnB
Although I have used tableA in the condition I could use any table from the From clause or even an exists and a subquery.
Regards
Alan
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.