Concat相关功能

时间:2015-11-07 02:02:31

标签: sql excel vba ms-access

使用ConcatRelated http://allenbrowne.com/func-concat.html

时出错

我的数据如下:

enter image description here

enter image description here

希望此结果计时时间右侧

使用此

SELECT ConcatRelated("Clocking Time"
                   , "ClockingQuery"
                   , "Patrol Time = ' "& [Patrol Time] & "'") AS Clock
FROM ClockingQuery;

收到错误

怎么办?

ms-access sql concatrelation concatenate

1 个答案:

答案 0 :(得分:0)

您必须使用格式正确的字符串表达式作为日期值,并避免使用字段名称中的空格和/或拼写错误:

SELECT 
    ConcatRelated("ClockingTime", "ClockingQuery", "[Patrol Time] = #" & Format([Patrol Time], "yyyy\/mm\/dd") & "#") AS Clock 
FROM 
    ClockingQuery;