我正在將一些mysql查詢轉移到postgres,並且遇到了這個不起作用的過程。在多個表上執行左連接時遇到問題
select (tons of stuff)
from trip_publication
left join trip_collection AS "tc" on
tc.id = tp.collection_id
left join
trip_author ta1, (dies here)
trip_person tp1,
trip_institution tai1,
trip_location tail1,
trip_rank tr1
ON
tp.id = ta1.publication_id
AND tp1.id = ta1.person_id
AND ta1.order = 1
AND tai1.id = ta1.institution_id
AND tail1.id = tai1.location_id
AND ta1.rank_id = tr1.id
該查詢似乎在「trip_author ta1」行上死去,我在上面標記了它。實際的錯誤信息是:
syntax error at or near ","
LINE 77: (trip_author ta1, trip_person tp1, ...
我經歷了文檔,它似乎是正確的。我在這裏做錯了什麼?任何反饋將不勝感激。
工作就像一個魅力。謝謝! – 2012-07-30 19:00:35