刚才看到你原先发的帖子,看来是因为编号不统一的原因,呵呵。SQL中用Convert吧,像这样 SELECT * FROM a INNER JOIN b ON CONVERT(char(20), a.id, 104) = CONVERT(char(20), b.ProductRef, 104)
Access ? 保留字冲突? 》》》 select 金额-管理费 +(case when (select Sum(收入-支出) from [[type]] where [type].项目编号=account.项目编号) is null then 0 else (select Sum(收入-支出) from [type] where [type].项目编号=[account].项目编号) end) as 余额 from [account]
关键字问题?>>>>select 金额-管理费 +(case when (select Sum(收入-支出) from [type] where [type].项目编号=account.项目编号) is null then 0 else (select Sum(收入-支出) from [type] where [type].项目编号=account.项目编号) end) as 余额 from [account]
SELECT *
FROM a INNER JOIN
b ON CONVERT(char(20), a.id, 104) = CONVERT(char(20), b.ProductRef, 104)
》》》
select 金额-管理费 +(case when (select Sum(收入-支出) from [[type]] where [type].项目编号=account.项目编号) is null then 0 else (select Sum(收入-支出) from [type] where [type].项目编号=[account].项目编号) end) as 余额
from [account]
from [account]