Since “schema” is a meta data term, it should never be a table name. You also have not learned the ISO-11179 rules for data element names, as you said, it is a legacy database (aka “family curse” ?).
The UPDATE.. FROM.. syntax is a bad idea. Its history goes back to 1970's Sybase and pre-ANSI days. Its semantics have changed from vendor to vendor; it used to do multiple updates on the same rows.
It is a bitch to optimize and you cannot safely port your code.
>> var_lid is to be set as 'T' when the dato of the product does not exceed the selected dato. Some products are refreshed past this date (a continuation of sorts). If the product_name has a date that continues past the selected date then it should not be included in the update. <<
I would guess you will be able to use [NOT] EXISTS() and get better performance.
UPDATE "Schema"
SET varl_id = 'S'
WHERE varl_id = 'T'
AND NOT EXISTS
(SELECT *
FROM "Schema" AS S1
WHERE S1.varl_id = 'T' -- redundant
AND S1.dato > '2001-01-01' -- past date
AND ..); -- more conditions
>> The DB "Schema" can have more than 1,000,000 records [sic], We are using pervasive SQL. All fields [sic] (var_lid, p_nbr, product_name etc are strings). The DB is VERY old and does NOT have any unique identifiers. <<
Rows are not records and columns are not fields. This was designed as a paper file system and there is no way to have any DRI. You probably got that far.
