我正在尝试创建简单的需求管理数据库。基本上我有如下两张表:
Contract_requirements 有 2 列:
CR_ReqID | Description
reqCR1 | Contract req description 1
reqCR2 | Contract req description 2
软件要求
Title | SW_ReqID | RootReq
SW req description 1| reqSW1 | reqCR1, reqCR2
SW req description 2| reqSW2 | reqCR1
SW req description 3| reqSW3 | reqCR2
我想编写查询来接收这样的表:
CR_ReqID |Description |where used?
reqCR1 |Contract req description 1 |reqSW1, reqSW2
reqCR2 |Contract req description 2 |reqSW1, reqSW3
表“合同要求”和“软件要求”与“RootRee”栏相关
我尝试实现 Allen Browne 的代码http://allenbrowne.com/func-concat.html#Top
这是我的查询
SELECT Contract_requirements.CR_ReqID, ConcatRelated("SW_ReqID ","SW_requirements","RootReq = """ & [CR_ReqID] & """") AS Expr1
FROM Contract_requirements;
但我在 Access 中遇到错误
“Error3831:多值字段‘RootReq’不能在 WHERE 或 HAVING 子句中使用”
你们能帮我让这个工作吗?
提前致谢