SELECT "a.ParcelID", "a.PropertyAddress", "b.ParcelID", "b.PropertyAddress", isnull("a.PropertyAddress", "b.PropertyAddress")
from data "a"
join data "b"
on "a.ParcelID" = "b.ParcelID"
and "a.ID" <> "b.ID"
where "a.PropertyAddress" is null
对于上面的代码,它显示我错误的任何解决方案
ERROR: column "a.ParcelID" does not exist
LINE 4: on "a.ParcelID" = "b.ParcelID"
^
HINT: Perhaps you meant to reference the column "a.ParcelID" or the column "b.ParcelID".
1条答案
按热度按时间vom3gejh1#
使用双引号时不要包含表别名,例如
a."ParcelID"
或a."PropertyAddress"
一般来说,建议避免使用需要用引号开始的列名。