Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Case statement in Physical table

Received Response
24
Views
9
Comments
GSR
GSR Rank 3 - Community Apprentice

Is it possible to write a 'Case When' statement in 'Physical Layer' while joining tables?

Thanks in Advance.

Answers

  • Yes, open the expression builder and write it there inside (so not directly in the textarea, the "Expression" field, of the join).

    Capture.PNG

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Adding to Gianni: But you must do it on a fresh join. You can't change an existing "=" join to a complex join.

  • True: if the join is already saved as physical foreign key join first delete it. The properties window of the join clearly tell you the kind of join:

    Capture.PNG

    Capture2.PNG

  • GSR
    GSR Rank 3 - Community Apprentice

    when i am trying same method getting below error message

    pastedImage_0.png

    Thanks

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    What *precisely* are you putting into the join condition?

  • You know that if you post directly everything we are not going to try to guess what you maybe try to do?

  • I can have this error when I try to write a CASE WHEN in a physical foreign key join. This is what Christian first said: if it's a "simple" join you must first delete it and create a new one which will be saved as complex join (with the CASE WHEN directly) and not as foreign key join.

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    Performance will play a factor ... if you have large row counts this case is going to be evaluated constantly and may prove problematic.  So, yes, you can do it, & yes it works ... doesn't always work well.

  • GSR
    GSR Rank 3 - Community Apprentice

    Thank you so much Gianni Ceresa and Christian Berg . Problem solved. created a new complex join between two tables.