Code:
SELECT tblOrderInfo.date_to_ship, tblCategories.CategoryName, tblOrderInfo.client, tblOrderInfo.Ord_num, Count(tblOrderDetails.ID) AS OrderRollCount
FROM (tblCategories INNER JOIN tblCustomers ON tblCategories.CategoryID = tblCustomers.CategoryID) INNER JOIN (tblOrderInfo INNER JOIN tblOrderDetails ON tblOrderInfo.Ord_num = tblOrderDetails.ord_num) ON tblCustomers.CustomerID = tblOrderInfo.shp_to
GROUP BY tblOrderInfo.date_to_ship, tblCategories.CategoryName, tblOrderInfo.client, tblOrderInfo.Ord_num;
I'm new to SQL and VBA and trying to find a way to combine multiple similar records into one field, I've included the SQL for the query I have set up. I'm trying to figure out how to concatenate the ord_num (separated by commas) when the fields "date_to_ship", "CategoryName", & "Client" all match up.
I searched tons of similar forums but I'm having a hard time finding something I can use. Somebody please help!! if you need more information please let me know!