Consolidating records in a table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ravxm

    Consolidating records in a table

    Hello people,

    I have some records in a table that have common values for ex:

    FNAME LNAME SSN EE
    CH SP
    John Smith 1234567 20000
    John Smith 1234567
    10000
    Jane Doe 987654 15000
    Jane Doe
    987654 5000

    How do I make a query that merges the records to:
    FNAME LNAME SSN EE CH SP
    John Smith 1234567 20000 10000
    Jane Doe 987654 15000
    5000

    I will appreciate any help, Thanks.
  • ravxm

    #2
    Re: Consolidating records in a table

    On Feb 13, 12:21 pm, ravxm <rav...@gmail.c omwrote:
    Hello people,
    >
    I have some records in a table that have common values for ex:
    >
    FNAME        LNAME          SSN               EE
    CH                SP
    John            Smith           1234567           20000
    John            Smith           1234567
    10000
    Jane            Doe              987654            15000
    Jane            Doe
    987654                                                    5000
    >
    How do I make a query that merges the records to:
    FNAME          LNAME          SSN        EE         CH         SP
    John               Smith            1234567   20000  10000
    Jane               Doe                987654  15000
    5000
    >
    I will appreciate any help, Thanks.
    Somehow when I submitted the post the text went all crazy. What I
    basically want is to consolidate the records for the same person with
    some null values into one record without null values. Also, CH and SP
    below FNAME and LNAME are columns. The 5000 below Jane was supposed to
    be under the SP column.

    Comment

    • Larry Linson

      #3
      Re: Consolidating records in a table

      You'll need a more specific and precise definition of how you want to
      consolidate records. If all but one of the fields will be null, and there
      will never be two records with data in the same field, it would be
      simpler -- but experience tells me that isn't always going to be the case.

      Larry Linson
      Microsoft Office Access MVP


      "ravxm" <ravxmm@gmail.c omwrote in message
      news:d9797ca4-53f0-41fe-90ea-4fcda4874493@y5 g2000hsf.google groups.com...
      On Feb 13, 12:21 pm, ravxm <rav...@gmail.c omwrote:
      Hello people,
      >
      I have some records in a table that have common values for ex:
      >
      FNAME LNAME SSN EE
      CH SP
      John Smith 1234567 20000
      John Smith 1234567
      10000
      Jane Doe 987654 15000
      Jane Doe
      987654 5000
      >
      How do I make a query that merges the records to:
      FNAME LNAME SSN EE CH SP
      John Smith 1234567 20000 10000
      Jane Doe 987654 15000
      5000
      >
      I will appreciate any help, Thanks.
      Somehow when I submitted the post the text went all crazy. What I
      basically want is to consolidate the records for the same person with
      some null values into one record without null values. Also, CH and SP
      below FNAME and LNAME are columns. The 5000 below Jane was supposed to
      be under the SP column.


      Comment

      Working...