Skip to content

Instantly share code, notes, and snippets.

@YumaInaura
Last active April 21, 2016 07:22
Show Gist options
  • Save YumaInaura/b2dc08bdd934b7ded6ea to your computer and use it in GitHub Desktop.
Save YumaInaura/b2dc08bdd934b7ded6ea to your computer and use it in GitHub Desktop.
BigQuery で WHEN CASE 文が書けない時の対処法 ref: http://qiita.com/Yinaura/items/5cfab23d32a57c259a5c
SELECT
CASE fruit
WHEN 'Apple' THEN 'is apple'
WHEN 'Orange' THEN 'is orange'
ELSE 'none'
END AS fruit_kind;
Query Failed
Error: searched case expression not supported at:
SELECT
CASE
WHEN fruit = 'Apple' THEN 'is apple'
WHEN fruit = 'Orange' THEN 'is orange'
ELSE 'none'
Row fruit_kind
1 is apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment