我的代码中出现以下语句的语法错误,我已经完成了它,除非我错过了什么,否则我看不到任何错误:
错误是
关键字 RIGHT 附近的语法不正确”
("SELECT D1.DR, D1.CR, D1.ASSET_NO, (Coalesce(addit_ytd,0) + DR - CR) AS ADDIT_YTD"
+"FROM (SELECT coalesce (sum(dr_amount),0) AS DR, coalesce (sum(cr_amount),0) AS CR , asset.asset_no"
+"FROM posting RIGHT JOIN asset ON asset.asset_no = posting.asset_no, sysasset"
+"WHERE asset.asset_no = @AssetNumber"
+"AND (period <= posting.period) AND (period >= sysasset.asset_open_per)"
+ "GROUP BY asset.asset_no) AS D1 INNER JOIN dbo.asset ON D1.asset_no= asset.asset_no", DataAccess.AssetConnection);