SELECT `justfunctions.eu.remove_extra_whitespaces`("Hi there .")
/*--Output--
Hi there .
*/
CREATE OR REPLACE FUNCTION `your_project_id.your_dataset_id.remove_extra_whitespaces`(`string` string)
RETURNS string AS (REGEXP_REPLACE(string, r'\s+',' '))
OPTIONS ( description = '''Removes extra whitespaces in a <string>.''')
SQL User Defined Function (SQL UDF)
See something wrong? Contact us or report an issue on Github.