Skip to content

Instantly share code, notes, and snippets.

@janbenetka
Created August 23, 2020 17:31
Show Gist options
  • Save janbenetka/298b552fcbe89205c28012e5c142e3bf to your computer and use it in GitHub Desktop.
Save janbenetka/298b552fcbe89205c28012e5c142e3bf to your computer and use it in GitHub Desktop.
[Add leading zeros in BigQuery] #leading_zero #bigquery
SUBSTR(FORMAT("00%d", state_fips ), -2) as state_fips,
SUBSTR(FORMAT("00000%d", fips ), -5) as fips,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment