Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert in between
Message
From
04/02/2005 17:37:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00983843
Message ID:
00984066
Views:
28
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform