Brent Baisley wrote:
If you are using 4.1, you can look into the GROUP_CONCAT function.
Otherwise, try a self join like this:
SELECT A.LastName,A.OrderNum,B.OrderNum
FROM Orders AS A
LEFT JOIN Orders AS B ON A.LastName=B.LastName
WHERE A.OrderNum!=B.OrderNum
ORDER BY A.LastName
That joins the Order
If you are using 4.1, you can look into the GROUP_CONCAT function.
Otherwise, try a self join like this:
SELECT A.LastName,A.OrderNum,B.OrderNum
FROM Orders AS A
LEFT JOIN Orders AS B ON A.LastName=B.LastName
WHERE A.OrderNum!=B.OrderNum
ORDER BY A.LastName
That joins the Order table with itself on
Please post the structure of your orders table. (SHOW CREATE TABLE
orders). I need to know what you are using as a primary key in order to
help you to uniquely identify each duplicated row.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
"Paul Fine" <[EMAIL PROTECTED]> wro