where语句有问题,
b.game_year=(select game_year from soccer_system) and 
b.game=(select game from soccer_system)
是否是一对一的关系呢?

解决方案 »

  1.   

    用inner 替换 left join 看看效果,
    我仅能帮你看sql语句,至于逻辑关系是否正确,你就得自己看了
      

  2.   

    在程序中的应该是字符问题啊把你的sql语句拿到查询分析器里执行一下,会有提示的
      

  3.   

    在程序中好多错误的波浪线
    string SQL="select * from soccer_exchange a left join soccer_manger_dispose b "
    +"on (a.player_id=b.player01 or a.player_id=b.player02 or "
    +"a.player_id=b.player03 or a.player_id=b.player04 or a.player_id=b.player05 or a.player_id=b.player06 or "
    +"a.player_id=b.player07 or a.player_id=b.player08 or a.player_id=b.player09 or a.player_id=b.player10 or "
    +"a.player_id=b.player11) where a.user_id=user_id and a.state=1 and b.game_year=(select game_year from soccer_system) and "
                    +"b.game=(select game from soccer_system)";
      

  4.   

    String SQL="select * from soccer_exchange a left join soccer_manger_dispose b on "
    +"(a.player_id=b.player01 or a.player_id=b.player02 or "
    +"a.player_id=b.player03 or a.player_id=b.player04 or a.player_id=b.player05 or "
    +"a.player_id=b.player06 or "
    +"a.player_id=b.player07 or a.player_id=b.player08 or a.player_id=b.player09 or "
    +"a.player_id=b.player10 or a.player_id=b.player11) "
    +" where a.user_id=b.user_id and a.state=1 and b.game_year=(select game_year "
    +" from soccer_system) and b.game = (select game from soccer_system)";
    "select game from soccer_system" 返回结果是唯一的么?否则就出错改为in 吧