SELECT name,trans FROM skyplan_deploy.deploy_sids d WHERE apt='KBOS' AND name != trans
LEFT JOIN
(SELECT distinct c.sid_ident as name,c.fix_ident from corept.std_sid_leg as c
INNER JOIN
(SELECT sid_ident,transition_ident,max(sequence_num) seq,route_type
FROM corept.std_sid_leg
WHERE data_supplier='J' AND airport_ident='KBOS'
GROUP BY sid_ident,transition_ident)b
ON c.sequence_num=b.seq and c.sid_ident=b.sid_ident and c.transition_ident=b.transition_ident
WHERE c.data_supplier='J' and c.airport_ident='KBOS')right_tbl
ON d.name=right_tbl.sid_ident;
這是我code..when執行我在LEFT JOIN說,語法是wrong.Anybody幫助,請...我已經通了語法教程,但得到錯誤結果空手而歸。謝謝。合成結果與左連接加入
這是我errror ...你有一個錯誤的SQL語法;檢查與您的MySQL服務器版本相對應的手冊,以便在'LEFT JOIN (SELECT distinct c.sid_ident as name,c.fix_ident from corept.std_sid_'at line 2 – user2037445 2013-03-21 07:15:32
'')處使用正確的語法,爲什麼不使用union ? – xurca 2013-03-21 07:16:44
我需要找到數據差異 – user2037445 2013-03-21 07:18:30