Skip to content

Instantly share code, notes, and snippets.

@pigreco
Last active June 5, 2020 11:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pigreco/dc7e370ff36c35d0bc5f2ee1e2954025 to your computer and use it in GitHub Desktop.
regexp_replace(
array_to_string(
array_filter(
string_to_array(
relation_aggregate(
relation:='rel_reg_prov',
aggregate:='concatenate',
expression:="SIGLA"||'-'||"cod_rip", -- concateno i campi
concatenator:=','
)) , @element Ilike '%3%' AND @element Ilike '%a%' ) ) -- filtro complesso
,'(.+?)(-[^-, ]+)','\\1') -- regex: per estrarre solo il valore del primo campo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment