Sunday, 15 May 2011

compress() function in BigQuery -



compress() function in BigQuery -

i have string fields in bq remove spaces from. in sas, there function compress(). there comparable function in bq?

where firstname not null

does not remove records there single space, example.

thanks!

you may utilize regexp_replace function mentioned in query reference remove spaces.

use as:

regexp_replace('orig_str', 'reg_exp', 'replace_str')

for example:

select regexp_replace(' remove spaces', ' ', '')

returns 'removeallspaces'.

google-bigquery

No comments:

Post a Comment