Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add case in Inner Join

Srini123456May 16 2020 — edited May 16 2020

In Inner join I want to check the condition -1 if condition - A is success, condition-2 if condition b success. For that i wrote the below but no luck.

Can someone help me out

INNER JOIN student_unit_attempt sua on sua.person_id=sei.person_id

                                                                      AND (case

                                                                            WHEN  i_unit_attempt_status IS NOT NULL

                                                                               THEN (sua.unit_attempt_status = 'ENROLLED')

                                                                            WHEN  i_unit_attempt_status IS NULL

                                                                                THEN (sua.unit_attempt_status ='COMPLETED')

                                                                               END)

Comments
Post Details
Added on May 16 2020
3 comments
1,393 views