开发者

How to combine multiple column

I wanted to combine 11 columns of a form into single column. here is my query

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;

But not getting required result.


You need to replace the + with a &

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜