Merging rows

  • Thread starter Thread starter bau
  • Start date Start date
B

bau

Hi everybody!

I have e a problem merging data of several rows in one table in Access
2003. The table structure looks like this:
-------------------------------------------------------------------------------
| Key | CustomerID | Attribute1 | Attribute2 | Attribute3 |
-------------------------------------------------------------------------------
| 1 | 2006 | True | False | False |
| 2 | 2006 | False | True | False |
| 3 | 2006 | False | False | True |

now I would need to construct a query, which displays the information
like that:

-------------------------------------------------------------------------------
CustomerID | Attribute1 | Attribute2 | Attribute3 |
-------------------------------------------------------------------------------
2006 | True | True | True |


Any help is very much appreciated! Thank you!

Ray
 
I have e a problem merging data of several rows in one table in Access
2003. The table structure looks like this:
-------------------------------------------------------------------------------
| Key | CustomerID | Attribute1 | Attribute2 | Attribute3 |
-------------------------------------------------------------------------------
| 1 | 2006 | True | False | False |
| 2 | 2006 | False | True | False |
| 3 | 2006 | False | False | True |

now I would need to construct a query, which displays the information
like that:

Since True is -1 and False is 0, this should work:

SELECT
CustomerID,
MIN(Attribute1),
MIN(Attribute2),
MIN(Attribute3)
FROM
CustomerTable
GROUP BY
CustomerID
 
That worked. Thanks Neil!


Neil said:
Since True is -1 and False is 0, this should work:

SELECT
CustomerID,
MIN(Attribute1),
MIN(Attribute2),
MIN(Attribute3)
FROM
CustomerTable
GROUP BY
CustomerID


--
Neil Sunderland
Braunton, Devon

Please observe the Reply-To address
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top