General information
Category:
Coding, syntax & commands
Chris,
I think what you are looking for is something like this:
LOCAL lcField
FOR i = 1 TO 52
lcField = 'week' + ALLTRIM(STR(i))
? MyTable..&lcField.
ENDFOR
HTH
Doug
>What I am trying to do is avoid a 52 week case statement by saving the field i.e. dmd_ as a variable junk_key and store a 1 to count_key. Then I would increment the count_key as needed. Thus, replacing an on_hand field with the field junk_key+alltrim(str(count_key) as needed. This would greatly decrease my coding. When I try the replace I get data type mismatch. Both field are integer. What I am asking is can I save a field as a variable nad use it in a replace statement for another field.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only