Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Problem Grouping columns in a query

$
0
0
I have two tables, Table1 and table2.
Table1 has the customer Info; Table2 has Notes for each Customer.
Table1
CustomerID Name Address
1-----------JohnDoe----- abc
2 -------- james ----- cba

Table2
-Id customerID Hold Recheck
1 --------1------ note1 renote
2 --------1------ note2
3 --------1 -------------renote2

When I execute the query below I get this:
JoeDoe note1
JoeDoe Note2
JoeDoe Null
But I would like to get this
JohnDoe note1
--------Note2
I have tried to create a function in access but the queries that contain functions do not show under views in VS they show under the Funtion folder and I’m not able to extract the data from them.

SELECT        CustomerList.customerlist, Status_Notes_tbl.Hold
FROM            (Status_Notes_tbl INNER JOIN
                         CustomerList ON Status_Notes_tbl.CustomerID = CustomerList.ID)
ORDER BY CustomerList.customerlist

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>