REGEXP_REPLACE (to replace empty strings)

280 views
Skip to first unread message

JKWA

unread,
Apr 26, 2012, 2:02:30 AM4/26/12
to bigquery...@googlegroups.com
I'd like to use REGEXP_REPLACE to replace empty strings with "MISSING" but I'm not having much luck.  Any suggestions?

Joe

Siddartha Naidu

unread,
Apr 26, 2012, 10:07:11 AM4/26/12
to bigquery...@googlegroups.com

Why not
  IF(LENGTH(field)=0, "MISSING", field)

JKWA

unread,
Apr 26, 2012, 6:46:28 PM4/26/12
to bigquery...@googlegroups.com
Thanks Siddarth, that's just what I needed.

Joe


On Thursday, April 26, 2012 7:07:11 AM UTC-7, Siddarth wrote:

Why not
  IF(LENGTH(field)=0, "MISSING", field)

Reply all
Reply to author
Forward
0 new messages