Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 108817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:58:18+00:00 2026-05-11T01:58:18+00:00

I think this should be easy, but it’s evading me. I’ve got a many-to-many

  • 0

I think this should be easy, but it’s evading me. I’ve got a many-to-many relationship between Accounts and Account Groups. An Account can be in zero or more Groups, so I’m using the standard join table.

Accounts  -------- ID BankName AcctNumber Balance  AccountGroups ------------- ID GroupName  JoinAccountsGroups ------------------ AID GID 

I’m using MS Access, FWIW. Also, this is for a low-bandwidth situation, so code optimization isn’t as important as simplicity/readability.

I’m using php as a presentation layer, so a bare-bones result from Access is fine.

As for what to do with the multi-result situation, I actually have two things I’m trying to build. The first lists all the groups in one column thus:

Bank       AcctNum       Balance    Groups --------|--------------|----------|---------------- Citi       930938        400        Payroll HSBC       8372933       100        Monthly, Payroll Wells      09837         800        - Chase      8730923       250        Monthly 

The second is a master-detail list:

Name          AcctNum    Balance ------------|----------|---------- Payroll (2)              500   Citi        930938     400   HSBC        8372933    100          .................................. Monthly (2)              350   HSBC        8372933    100            Chase       8730923    250 .................................. Wells         09837      800 

For the master-detail, my plan was just to get a big result set from the db, and munge it in php as needed. Since there’s going to be some significant post-processing in php anyway, maybe I should just do three separate queries and do the joining there. (Since I’m more comfortable with that language.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:58:19+00:00Added an answer on May 11, 2026 at 1:58 am

    This

    SELECT a.BankName, a.AcctNumber, a.Balance, ag.GroupName FROM (Accounts a        LEFT JOIN JoinAccountsGroups jag        ON a.ID = jag.AID)        LEFT JOIN AccountGroups ag       ON jag.GID = ag.GroupName; 

    Will select the data for the first table, however to concatenate the groups (Monthly, Payroll), you would need a User Defined Function (UDF), wich would not be available to Jet, so processing in PHP would be necessary.

    You may wish to read Understanding SQL Joins. It refers to MySQL but applies to Jet, for the most part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should hopefully be an easy solution but I can't think of how to
I think this should be a pretty easy question to answer but I can't
I think this should be a very easy one, but I cant find the
This one should be easy, and I think I know the right answer, but
I think that this should be easy, but I'm not able to get it
I think it should be quite easy but I really can't make it work.
i think this should be very easy , but i really don't know how
So I'm new to Arrays, but I think this should be fairly easy, I
This (should) be easy, I think, but I'm unable to get today's date to
Okay, this should be a fairly easy question I think, but haven't been able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.