Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Conditional Joins

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

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question