actually Al i was trying to adapt the 'find duplicates' code that Hilmar sent me for a new task. the new task was to display names for those records with data in the field ex2s and then display those names as a text string - sorry for the confusion.
exs2 is a numeric field
vname is a character field which contains a name.
k
>You're still not giving much information, as a wild guess I'd say you're using your most recent code to spin through any duplicates that were found with the SELECT, and for some reason generating a period-delimited string with the contents of one column of the SELECT.
>
>If that's not right you'll need to post some table structures etc. for me to help any further.
>
>>thanks Al
>>I'm not getting any of the selected records in the browse - but the good news is no errors once i use set enginebehavior 70.
>>
>>Here's the old school of exactly what i want to do and it gives me the info i require. I was looking for more sophisticated way to catpure the search.
>>
>>
>>extra=" "
>>do while not eof()
>>if ex1s>0
>>extra=rtrim(extra)+vname+"."
>>endif
>>skip
>>loop
>>enddo
>>
>>? extra
>>
>>
>>
>>>>Hilmar sent me this solution for tracking duplicates in a database a little while ago - it works very well.
>>>>Further to this solution, how would i display the names plus an added field called field2 and attribute this information to a variable called myinfo.
>>>>
>>>>Thanks for your help.
>>>>k
>>>
>>>Guessing about exactly what you want to do:
>>>
>>>select name, count(*) as count, field2 AS MyInfo ;
>>> from mydata;
>>>group by name;
>>>having count > 1;
>>>INTO CURSOR TEMPDUPLICATE
>>>if _tally > 0
>>>MessageBox("Alert: There are duplicates.")
>>>browse normal
>>>endif
>>>>
>>>I believe VFP9 (maybe 8 as well) won't let you GROUP BY unless you include all non-aggregate columns. In that case you may need to temporarily SET ENGINEBEHAVIOR 70 to make the command work.