I have a table MYTABLE.
This contains customers and locations.
What Sql statement can I use to find out what customers have more than 1 location
and only display on those with more than 1 location? A location can be used for several different customers.
This did not work: this only showed the number of Occurances
SELECT CU _NO, LOC_NO, COUNT(LOC_NO) AS NUMBEROCC
FROM MYTABLE
GROUP BY LOC_NO
HAVING (COUNT(LOC_NO)>1)
The table has more than one row of of the same customer(sorry this was important)
1 Answer