oracle has a nice built in function for doing if null, however I want to do if = 0; is there a simple way to do this?
nvl(instr(substr(ovrflo_adrs_info,instr(ovrflo_adrs_info,’bldg’)+5),’ ‘),
length(substr(ovrflo_adrs_info,instr(ovrflo_adrs_info,’bldg’)+5))))
This is going as a parameter to a substr function.
If instr(substr(ovrflo_adrs_info,instr(ovrflo_adrs_info,'bldg')+5),' ') is != 0 then I want that value, otherwise I want the value of length(substr(ovrflo_adrs_info,instr(ovrflo_adrs_info,'bldg')+5))
is there an easy way to do this?
I think you’ll need to use CASE
e.g.