Antonio,
I can't tell you how many times I've used your nifty little SQL. Thanks again!
Yossi
>You
should have a primary key somewhere out there, it would allow for a much more elegant and cleaner SQL...
>
>
>SELECT itemnum, location, RECNO() as recnum ;
> FROM curLoc ;
> WHERE (location + TRANSFORM(itemnum)) IN ;
> (SELECT (location + TRANSFORM(itemnum)) FROM curloc GROUP BY itemnum, location HAVING COUNT(*) > 1) ;
> INTO CURSOR curDup
>
>
>>Hi All:
>>
>>I can't figure out the SQL needed for this problem. There cannot be 2 records with the same location. Therefore Item# 6677 is invalid:
>>
>>
>>Item# Location
>>1234 LOC1
>>2345 LOC1
>>2345 LOC2
>>6677 LOC1
>>6677 LOC1
>>
>>
>>I need the SQL to generate the following cursor, containing all the invalid records, appending the recno():
>>
>>
>>Item# Location Recno
>>6677 LOC1 43
>>6677 LOC1 78
>>
>>
>>Thanks,
>>
>>Yossi