Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003

    Unanswered: Showing all the customers for an account on one row

    Hi, can anyone think of how to get round this. I am using MS Excel Query on my Oracle database.

    I want to make a spreadsheet showing account number, customer 1, customer 2, customer 3. There is an accounts table, an accounts_links table which links the customers to the accounts and a customers table.

    On the accounts_links table there is one row for each customer on an account with a "holder number" to say if it is customer 1, 2 or 3.

    At the moment I am only bringing back accounts where there are 3 customers. Some accounts will only have 1 or 2 customers.

    I thought to bring in the accounts_links and customers tables in three times now it is just multiplying all the rows together!

    Can anyone think of a way round this to run it in one sql, I don't want to have to use excel functions.


  2. #2
    Join Date
    Aug 2003
    Phoenix, AZ
    If you haven't solved this yet, can you post a sample of the sql code from MS Query? Can get to it via the SQL button when you go into the edit function from Excel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts