Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REPLace .... or SCAN ....
Message
From
13/09/2002 16:16:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00700335
Message ID:
00700337
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>Hello Foxperts,
>
>Is the following code 'proper'?
>REPLACE reprints WITH reprints+1 FOR flagged="P"
>REPLACE flagged WITH "O"  FOR flagged="P"
>or should I do this:
>SCAN FOR flagged="P"
>  REPLACE reprints WITH reprints+1, flagged WITH "O"
>ENDSCAN
>
>Any comment and critique gratefully accepted.

I think both are proper.

You can also:
update MyTable;
  set reprints = reprints + 1, flagged = "O";
  where flagged = "P"
This will automatically open, but not close, the table.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform