feat: initial commit
This commit is contained in:
commit
e214116e40
253 changed files with 17406 additions and 0 deletions
14
queries/functions/parsecountryfield.psql
Normal file
14
queries/functions/parsecountryfield.psql
Normal file
|
@ -0,0 +1,14 @@
|
|||
DECLARE
|
||||
delimiters TEXT[] := ARRAY[',', '/', '&', 'and'];
|
||||
countries TEXT[];
|
||||
result TEXT := '';
|
||||
BEGIN
|
||||
countries := string_to_array(countryField, ',');
|
||||
|
||||
FOR i IN 1..array_length(delimiters, 1) LOOP
|
||||
countries := array_cat(countries, string_to_array(result, delimiters[i]));
|
||||
END LOOP;
|
||||
|
||||
result := array_to_string(countries, ' ');
|
||||
RETURN trim(result);
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue