Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to find a record
Message
 
To
27/05/2005 10:11:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018119
Message ID:
01018126
Views:
14
Could a single UPDATE ... do the things that you want to do in SCAN..END loop?



>Thanks Borislav,
>
>That is what I am doing now. I was hoping (since it is Friday afterall) that I was overlooking a better way...
>
>Tracy
>
>>>field de_sysnum n(8,0)
>>>field de_histnum n(4,0)
>>>
>>>EXACT is on
>>>NEAR is off
>>>
>>>Example records:
>>>
>>>de_sysnum de_histnum
>>>13609 1
>>>13609 2
>>>13609 4
>>>13609 3
>>>14102 1
>>>1360 1
>>>1360 9
>>>
>>>active index is:
>>>
>>>transform(de_sysnum,'99999999')+transform(de_histnum,'9999')
>>>
>>>want to move to the first record with a de_sysnum of numeric 13609 and then want to scan while...endscan through only those records that have a de_sysnum of 13609 and ANY de_histnum.
>>
>>
>>old_exact = SET("EXACT")
>>SET EXACT OFF
>>SEEK transform(13609,'99999999')
>>SCAN WHILE de_sysnum == 13609
>>   **** Do something
>>ENDSCAN
>>SET EXACT &old_exact
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform