Maybe I've missed the point of the thread, but doesn't your select statement give those which HAVE the additional records rather than those that don't????
I would have thought that GROUP BY 1 HAVING COUNT(*)
= 1 would give the desired result.
>The following select should return all records "w/o second part". You can than add them to the original table.
SELECT LEFT(myfield,6) + "999" as newfield ;
> FROM mytable ;
> GROUP BY 1 ;
> HAVING COUNT(*) > 1 ;
> INTO CURSOR crsNewRec
>>
>>How to insert a record between for the second part does not exist ?
>>
>>010003
>>010003123
>>010003456
>>
>>010004
>>
>>010005
>>010005123
>>010005456
>>
>>As
>>
>>010004 does not have the second part like 010003 and 010005, I want to insert
>>another record to differentiate :
>>
>>010004999
>>
>>Any help would be appreciated
>>TIA