LoginSignup
0
0

More than 3 years have passed since last update.

BigqueryではLEFT JOINを使ってなくてもLEFT JOINのエラーが出る

Posted at

タイトルの通りBigqueryではleft joinを使ってなくてもleft joinのエラーが出ます。エラー文は以下です。

LEFT OUTER JOIN cannot be used without a condition that is an equality of fields from both sides of the join.

原因

相関サブクエリが原因でこのエラーが発生するらしい。相関サブクエリ内のwhere句で不等号を使うとエラーになるのだとか。以下参照。

http://silva-tech.hatenablog.com/entry/2018/04/14/233112

相関サブクエリは色々と制約があったり可読性も悪くなったりするので、便利だけどなるべく使わない方が良いかもしれない。

※相関サブクエリとは:
外側のクエリの値を内側で使用するサブクエリ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0