MS Access fields as columns

后端 未结 2 861
忘了有多久
忘了有多久 2021-01-22 20:17

How can you make a query in MS Access, so that the fields are grouped into columns?

It is easier to explain through an example.

Table:

        Br         


        
相关标签:
2条回答
  • 2021-01-22 20:44

    Try like this

    TRANSFORM Sum(tabl1.[Quantity]) AS SumOfQuantity
    SELECT tabl1.[brand], Sum( tabl1.[Quantity]) AS [Total Of Quantity]
    FROM tabl1
    GROUP BY tabl1.[brand]
    PIVOT tabl1.[Date];
    
    0 讨论(0)
  • 2021-01-22 20:47

    Or you can use 'Oleddbreader' for reading each record and formating it the way you want

    command.excutereader for excuting query fill data in reader and use loop to print data the way you want, you can use column by column name you sum the numeric data, you can alot of tricks with Reader Command

    0 讨论(0)
提交回复
热议问题