mercredi 24 avril 2019

Is there a way to use IF to show NULL values only when no input has been done?

I need help with a IF-statement or similar

This is to let me make a query report from our system but in some cases EXP_RCPT_NO doesnt have a value and i need a code that let me search for a specific value in EXP_RCPT_NO without showing empty results but at the same time shows the empty results when i search only il.lic_no

select il.lic_no,
       EXP_RCPT_NO
   from inv_lic il
 where il.lic_no like nvl ('&Licens', '%')
   and EXP_RCPT_NO like nvl ('&Order', '%')

It works if i remove the bottom row, but then it removes the option to search EXP_RCPT_NO

Aucun commentaire:

Enregistrer un commentaire