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!

Skip Join

Arunadeepti JakkaAug 25 2020 — edited Aug 25 2020

hi all,

I have a SQL which has a simple join as below

select B.PRODUCT FROM TABLEA A

JOIN TABLEB B

ON A."Key" = B."Key"

I need to extend this query such that if current month is January , then I need to skip join and  return hardcoded value as "default product" and if it is not January then I need to return the values using join in the above SQL .

Is it possible to do this in the above SQL query itself  .

Thanks

Comments
Post Details
Added on Aug 25 2020
3 comments
484 views