locked
How do you write a query to bucket all values in one column that share the same value in the another column in the same table? RRS feed

  • Question

  • Good Morning everyone!

    This will be a freebie for those experienced developers. I have a table with only two columns in it. A Part Number column and an ATA code column.

    There are Part Numbers that share the same ATA code. Or to word it in a different way. Multiple part numbers may have the same ATA code as there are revisions to Parts so they are issued new part numbers.

    What I would like to accomplish is to make a query to list all of those Part Numbers under Each of their associated ATA codes.

    Almost like a nested look somehow. Similar to a pivot table in excel.

    ATA Code

    PN1

    PN2

    PN3

    ATA Code

    PN1

    Tuesday, July 24, 2018 12:42 PM

Answers

  • It is not easy to do that in a query. You can design a report for this purpose; perhaps the easiest way is to use the Report Wizard. Tell the wizard to group the report by ATA Code.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by stillanoob Tuesday, July 24, 2018 1:27 PM
    Tuesday, July 24, 2018 1:00 PM

All replies

  • It is not easy to do that in a query. You can design a report for this purpose; perhaps the easiest way is to use the Report Wizard. Tell the wizard to group the report by ATA Code.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by stillanoob Tuesday, July 24, 2018 1:27 PM
    Tuesday, July 24, 2018 1:00 PM
  • Time for you to laugh. The only way I know how to make reports is by having a query opened already. And then I make the report from that way.
    Tuesday, July 24, 2018 1:02 PM
  • Got it! Thanks!
    Tuesday, July 24, 2018 1:27 PM