Unable to get Allen Browne's ConcatRelated to work on a simple table

我们两清 提交于 2019-12-02 10:13:46

I changed your A_date values to 1/13/2015 and stored those sample data in a table named YourTable. Using that table, this is the output in Access 2010 from the query below.

A_date    SumOfAbsent SumOfTardy SumOfVacation Reasons
--------- ----------- ---------- ------------- -------------------------------
1/13/2015           5                          Car Broke Down Doctor FLMA Sick
SELECT
    y.A_date,
    Sum(y.Absent) AS SumOfAbsent,
    Sum(y.Tardy) AS SumOfTardy,
    Sum(y.Vacation) AS SumOfVacation,
    ConcatRelated(
            'Reason',
            'YourTable',
            'A_date=Date()-1',
            'Reason',
            ' '
        ) AS Reasons
FROM YourTable AS y
WHERE y.A_date = Date()-1
GROUP BY y.A_date;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!