sql - Select empty column if regexp_match fails -


i'm trying select entities, if they're not match expression, 1 returns 'true' values.

select entity_id, regexp_matches(error_params, '"select_flight"') not null mytable group 1 

is there way solve such issue inside select statement or in case should use left join table regexp_matches result?

if i'm understanding question correctly, can use count case:

select entity_id,        count(case when error_params '%select flight%' 1 end) cnt mytable group 1 

Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -