Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT & UPDATE without index columns
Message
From
14/01/1999 06:48:16
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00175810
Message ID:
00175819
Views:
28
Nigel

>I have been asked to change some legacy code which scans a table and replaces fields based on scan criteria. The problem is that it locks the table when it finds the first matching row.
>

When you say "scans a table", are you using a scan/endscan loop or doing a REPLACE ALL FOR ... (another way to scan the table for records that match the criteria) ?? If you are doing a REPLACE ALL, the ALL keyword will implicitly lock the table (loose the ALL, and no LOCK). To avoid this, set an index (or create a temporary one). SEEK for the first matching record and if found, do your REPLACE to the REST while the HAVING criteria remains True.

>Is there any quick way of selecting over a certain record number or from a certain record number?<

Maybe I am misunderstanding or being way too simplistic here but what about SELECT * From SomeTable Where Recno('SomeTable') >=
HTH
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform