【发布时间】:2012-07-28 12:32:18
【问题描述】:
我在 Google BigQuery 中收到此错误:
Error: Ambiguous field reference in SELECT clause. (Remember to fully qualify all field names in the SELECT clause as <table.field>.)
我的查询是
SELECT LoanPerf1.loankey, Loans.Key
FROM prosperloans1.LoanPerf1
JOIN prosperloans1.Loans
ON LoanPerf1.loankey = Loans.Key
prosperloans1 是数据集 ID
2个表名是正确的。
无论哪个字段名首先出现在 select 子句中,都会返回错误。
Google SQL Syntax 上的文档说这是正确的:
// Simple JOIN of two tables
SELECT table1.id, table2.username
FROM table1
JOIN table2
ON table1.name = table2.name AND table1.id = table2.customer_id;
谢谢 肖恩
【问题讨论】:
标签: google-bigquery