我有以下查詢:SQL - 無效的列名
SELECT o.outcode AS lead_postcode, v.outcode AS venue_postcode, 6 * o.lat AS distance
FROM venue_postcodes v, uk_postcodes o
WHERE o.outcode = 'CF3'
GROUP BY v.outcode
HAVING SUM(distance)>100
ORDER BY distance
這個停止工作的時候我加入了部分GROUP BY v.outcode HAVING SUM(distance)>100
它說服務器無法處理請求。 --->無效的列名'距離'。
任何想法爲什麼?
不完全正確......看到羅布麻的評論。 – Tom 2011-03-24 10:42:54