艾伦的过程仅允许向该功能提供WHERe标准。我见过的其他版本允许传递整个SQL语句。
将必须建立2个查询,为每个InternalIncidentID返回DISTINCT值-
一个用于目标,一个用于受害者。这些查询将作为对Allen函数的每个调用的来源。
qryIncTargets
SELECt DISTINCT InternalIncidentID, TargetFullName FROM [Tar/Vic Query];
SELECt DISTINCT InternalIncidentID, VictimFullName FROM [Tar/Vic Query];
qryConcatenate
SELECt Investigations.InternalIncidentID, ConcatRelated("TargetFullName","qryIncTargets","InternalIncidentID='" & [InternalIncidentID] & "'") AS Tars, ConcatRelated("VictimFullName","qryIncVictims","InternalIncidentID='" & [InternalIncidentID] & "'") AS VicsFROM Investigations;
可以消除[Tar / Vic查询],而是使用[目标/受害者连接者]到[目标]和[受害者]的JOIN构建两个DISTINCT查询。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)