我创建了如下表
RegID - primary key
Confattid - foreign key
membchoiceid - foreign key and a multivalue field
tourId - foreign key and a multivalue field
其余类似于下面的查询:
所有付费字段均为货币格式。
我尝试将所有费用字段计算为新字段名称“total”。即使我编写查询,它也不显示任何错误,但在运行查询时它没有显示结果。
我的疑问:
SELECT ConferenceRegisterFee.RegID,
ConferenceRegisterFee.ConfStateRegFeePaid,
ConferenceRegisterFee.ConfSpouFeePaid,
ConferenceRegisterFee.ConfAttMembDuesPaid,
ConferenceRegisterFee.ConfLateFeePaid,
ConferenceRegisterFee.ConfRegFeePaid,
ConferenceRegisterFee.ConfAttMembDuesPaid,
[confstateregfeepaid]+[confspoufeepaid]+[confattmembduespaid]+[conflatefeepaid]+[confregfeepaid] AS total
FROM ConferenceRegisterFee
GROUP BY ConferenceRegisterFee.RegID,
ConferenceRegisterFee.ConfStateRegFeePaid,
ConferenceRegisterFee.ConfSpouFeePaid,
ConferenceRegisterFee.ConfAttMembDuesPaid,
ConferenceRegisterFee.ConfLateFeePaid,
ConferenceRegisterFee.ConfRegFeePaid,
ConferenceRegisterFee.ConfAttMembDuesPaid;
我是新来的。你们有什么想法可以帮我解决这个问题吗?
答案 0 :(得分:0)
非常感谢你的帮助。我已经可以运行查询,因为我忘记了NULL值。
我的查询: 选择ConferenceRegisterFee.RegID,ConferenceRegisterFee.ConfStateRegFeePaid,ConferenceRegisterFee.ConfSpouFeePaid,ConferenceRegisterFee.ConfAttMembDuesPaid,ConferenceRegisterFee.ConfLateFeePaid,ConferenceRegisterFee.ConfRegFeePaid,NZ([ConferenceRegisterFee] [ConfStateRegFeePaid]!)+ NZ([ConferenceRegisterFee]![ConfSpouFeePaid])+ NZ([ ConferenceRegisterFee]![ConfAttMembDuesPaid])+ NZ([ConferenceRegisterFee]![ConfLateFeePaid])+ NZ([ConferenceRegisterFee]![ConfRegFeePaid])AS Total 来自ConferenceRegisterFee;
再次感谢