1

I have a search page where for null values I use NVL for null conditions. But for one field I have to do a wildcard search. Is nvl possible with wildcard search eg. NVL(null,%name%)?

Vasil Lukach
  • 3,658
  • 3
  • 31
  • 40

2 Answers2

2

You can use NVL in this case only as "subfunction"
If you want get also null-s results do it like this:

SELECT anything 
  FROM your_table 
 WHERE NVL(column_can_be_null, 'substring_you_search_for')
       LIKE '%substring_you_search_for%'
Atiris
  • 2,613
  • 2
  • 28
  • 42
0

select * from your_table where column_name like NVL('%name%',column_name)