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

前端 未结 1 1357
感情败类
感情败类 2021-01-26 07:56

I am trying to use the ConcatRelated function to provide a summary report of the prior day\'s absences, tardies, and vacations. I have tried several variations and can\'t seem t

相关标签:
1条回答
  • 2021-01-26 08:00

    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;
    
    0 讨论(0)
提交回复
热议问题