I'm learning variables which I think I'm getting the aspect of. I've attempted to write a prg which will change records accordingly and so far it's working.
However, the issue I'm looking at here is there is a field that has two or three different records. For example,
Field Classno contains class numbers, TEACH and VISIT.
Field Freema contains £2.15 for class numbers, £3.00 for TEACH and £5.00 for VISIT.
Now, all the class numbers have £2.15 in the freema field following the program's code but I'm struggling to understand how you would change the Freema records for the TEACH and VISIT records. I can only think of declaring variables again but as far as I can understand and from everything I've read so far, Variables are declared for the 1st record in the field.
Also, the Freema field is numeric, which for the time being is simple to use (So in actual fact, the records don't contain the British pound symbol).
The other alternatives I can think of is to use the tables again in different areas/alias names and point to the specific record number? But there, I'd be unsure how to declare the record as a variable.
However, the issue I'm looking at here is there is a field that has two or three different records. For example,
Field Classno contains class numbers, TEACH and VISIT.
Field Freema contains £2.15 for class numbers, £3.00 for TEACH and £5.00 for VISIT.
Now, all the class numbers have £2.15 in the freema field following the program's code but I'm struggling to understand how you would change the Freema records for the TEACH and VISIT records. I can only think of declaring variables again but as far as I can understand and from everything I've read so far, Variables are declared for the 1st record in the field.
Also, the Freema field is numeric, which for the time being is simple to use (So in actual fact, the records don't contain the British pound symbol).
Code:
cd\cashless
SET EXCLUSIVE OFF
SET SAFETY OFF
USE classs.dbf
STORE Freema TO laFrees
UPDATE id SET Freema = laFrees WHERE Freem = "Y" AND Classno <> "TEACH"
The other alternatives I can think of is to use the tables again in different areas/alias names and point to the specific record number? But there, I'd be unsure how to declare the record as a variable.