Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Two table query - repeating customers please advise

Discussion in 'Information Technology' started by Gary, Jul 28, 2006.

  1. Gary

    Gary
    Expand Collapse
    Guest

    Hello,

    Hopefully there is a simple solution to this.

    I have two tables. One is customers, one is orders.
    Both share the key Customer ID.

    I have used the simple query wizard to create a query and selected
    fields from both tables. However the table that is produced is creating
    a new row for every order that a customer has placed. And thus
    duplicating customer details on every order row. This is not what I
    need.

    I need one row per customer. Some customers have 90 orders, and order
    details are about 9 fields, so I would like each customer row to have
    about 900 columns, called ORDER1, ORDER2, ORDER3, etc...

    Does this make sense? Please help if you can.

    Thanks,
    Gary.
     
  2. Loading...

    Similar Threads Forum Date
    As A Child, Public Marches Of Sikhism Made Me Uncomfortable. They Still Do . Why ? Whats The Logic Hard Talk Oct 16, 2016
    Arts/Society Backyard Vegetable Garden Language, Arts & Culture Dec 27, 2013
    Heritage Now a Vegetable Market, Ranjit Singh's Royal Haveli a Picture of Neglect History of Sikhism Nov 11, 2013
    Sikhism Helium: 1984 and the "Periodic Table of Hate" (Jaspreet Singh) Book Reviews & Editorials Oct 28, 2013
    Heritage How our entire history was dumped in a horse stable History of Sikhism Oct 28, 2013

  3. rico

    rico
    Expand Collapse
    Guest

    Hi,

    Its possible but will take some quite heavy programming, mainly because its
    not the way querys work.

    If you want to see orders related to customers, i would create a form for
    your customers details with a subform of orders, related by customerID.

    HTH

    Regards


    "Gary" wrote:

    > Hello,
    >
    > Hopefully there is a simple solution to this.
    >
    > I have two tables. One is customers, one is orders.
    > Both share the key Customer ID.
    >
    > I have used the simple query wizard to create a query and selected
    > fields from both tables. However the table that is produced is creating
    > a new row for every order that a customer has placed. And thus
    > duplicating customer details on every order row. This is not what I
    > need.
    >
    > I need one row per customer. Some customers have 90 orders, and order
    > details are about 9 fields, so I would like each customer row to have
    > about 900 columns, called ORDER1, ORDER2, ORDER3, etc...
    >
    > Does this make sense? Please help if you can.
    >
    > Thanks,
    > Gary.
    >
    >
     
  4. Gary

    Gary
    Expand Collapse
    Guest

    Oh no this is bad news...

    The problem is that I'm trying to 'export' the data in this form. I'm
    importing into a CRM program, that treats every row as a unique contact
    so I need only one customer per row.
    The customer order data is only associated with a customer if it
    appears on the same row as the customer in this CRM program's import
    facility (it is Act v. 6.0)

    Any suggestions please?

    Thanks,

    Gary.
     
  5. rico

    rico
    Expand Collapse
    Guest

    OK,

    I can under stand having one customer for per line, thats standard, but why
    would act then need each order in a column. I'm not familiar with act, but
    this seems an odd way of doing things.

    Rico

    "Gary" wrote:

    > Oh no this is bad news...
    >
    > The problem is that I'm trying to 'export' the data in this form. I'm
    > importing into a CRM program, that treats every row as a unique contact
    > so I need only one customer per row.
    > The customer order data is only associated with a customer if it
    > appears on the same row as the customer in this CRM program's import
    > facility (it is Act v. 6.0)
    >
    > Any suggestions please?
    >
    > Thanks,
    >
    > Gary.
    >
    >
     
  6. rico

    rico
    Expand Collapse
    Guest

    I would say you need, check act. Any database type system worth its salt
    would not work like this.

    Sorry to advise on company matter, but why use another program for CRM, if
    your data is in access, use access.

    Rico

    "rico" wrote:

    > OK,
    >
    > I can under stand having one customer for per line, thats standard, but why
    > would act then need each order in a column. I'm not familiar with act, but
    > this seems an odd way of doing things.
    >
    > Rico
    >
    > "Gary" wrote:
    >
    > > Oh no this is bad news...
    > >
    > > The problem is that I'm trying to 'export' the data in this form. I'm
    > > importing into a CRM program, that treats every row as a unique contact
    > > so I need only one customer per row.
    > > The customer order data is only associated with a customer if it
    > > appears on the same row as the customer in this CRM program's import
    > > facility (it is Act v. 6.0)
    > >
    > > Any suggestions please?
    > >
    > > Thanks,
    > >
    > > Gary.
    > >
    > >
     

Share This Page