#2014 - 命令不同步;你现在不能运行这个命令

时间:2014-10-10 04:32:37

标签: mysql

任何人都可以理解为什么我的错误命令不同步。大多数此查询在MSSQL中有效,但我已尝试将其修改为在MySQL中运行。

select pl.playerID, ( IFNull((select SUM(rsAmount) + SUM(rsOtherWinningsValue) from tn_results     where playerID=pl.playerID and includedInMoneyList=1) , 0)
 + pl.baseMoney) as totalMoney, pl.firstName, pl.lastName, pl.city, pl.state, pl.baseMoney, 
( SELECT count(*) 
 FROM tn_participants tp INNER JOIN 
tournament tn ON tn.tourneyID = tp.tourneyID LEFT OUTER JOIN 
registered_player rp ON rp.playerID = tp.playerID 
UNION ALL
SELECT count(*) 
 FROM tn_participants tp INNER JOIN 
tournament tn ON tn.tourneyID = tp.tourneyID RIGHT OUTER JOIN 
registered_player rp ON rp.playerID = tp.playerID
WHERE tp.playerID = pl.playerID and tn.firstDay >'12/31/(Year(NOW)-1)') 
as moneyList from registered_player pl 
where pl.divisionId=2
order by totalMoney DESC

0 个答案:

没有答案