如何组合多列

时间:2011-05-11 18:28:26

标签: ms-access

我想将表单的11列组合成单列。 这是我的查询

SELECT DormData.BuildingID, 
    BuildingDetails.BuildingName, 
    Contractors.Item, 
    ActionDetails.ActionType,
    (DormData.Note1 
        + DormData.Note2 
        + DormData.Note3 
        + DormData.Note4 
        + DormData.Note5
        + DormData.Note6
        + DormData.Note7
        + DormData.Note8
        + DormData.Note9
        + DormData.Note10
        + DormData.Note11) AS Notes
FROM ActionDetails 
    INNER JOIN (Contractors 
        INNER JOIN (BuildingDetails 
            INNER JOIN DormData 
                ON BuildingDetails.BuildingID = DormData.BuildingID) 
            ON Contractors.ID = DormData.ItemID) 
        ON ActionDetails.ActionID = DormData.ActionID;

但没有获得所需的结果。

1 个答案:

答案 0 :(得分:2)

您需要将&替换为&