I agree it looks weird. I didnt want to get into explaining. but it's because of arggggh Crystal Reports. The report I have needs the columns from itemswarehouse to be present for other reasons.
I think the only solution is to aggregate every single column using either first() or min() or other aggregate functions which would be a pain in the neck since I have 28 columns at least. I thought maybe there is a simpler way of doing it with sub selects and joins.
Here is what it will look like strung out with all the columns.
Code:
SELECT first( items.partnum), first(items.desc), sum(itemswarehouse.onhand_qty), etc etc rest of columns
FROM items
LEFT JOIN itemswarehouse ON items.partnum=itemswarehouse.partnum
GROUP BY items.partnum