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