1
case regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) then .........

For this part of code I am getting ParseException line 22:2 cannot recognize input near '*' ',' 'case' in expression specification (state=42000,code=40000) Can anyone help me out here.

leftjoin
  • 36,950
  • 8
  • 57
  • 116
connecttopawan
  • 208
  • 3
  • 14

1 Answers1

1

regexp looks good. case is wrong. It should be like this:

case when regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1) = 'something'
         then ...
 end

Or like this:

case regexp_extract(network_information,'^([\\w|-]+)[.|;].*',1)
     when 'something'      then ...
     when 'something-else' then ...
 end
leftjoin
  • 36,950
  • 8
  • 57
  • 116