原因:兩個表join的時候,不支持兩個表的字段 非相等 操作。
可以把不相等條件拿到 where語句中。
例如: right JOIN test.dim_month_date p2 on p1.month=p2.y_month and p1.day<=p2.day 可以改寫成 right JOIN test.dim_month_date_zyy p2 on p1.month=p2.y_month where p1.day<=p2.day 當然此時要注意 null 引起的記錄數不一致。
