Just wondering if there was a performance hit by doing A over B below? Or are they much of a muchness?
A:
B:
A:
Code:
/*Try and work out table using fact that field should start with EntityMnemonicKey*/
FOR FIRST lb-ENT FIELDS(EntDescription) NO-LOCK
WHERE lb-ENT.EntityMnemonicKey = SUBSTRING(ip-DBFieldName,1,3):
ASSIGN op-DBTable = lb-ENT.EntDescription.
END.
Code:
lv-EntityMnemonicKey = SUBSTRING(ip-DBFieldName,1,3).
/*Try and work out table using fact that field should start with EntityMnemonicKey*/
FOR FIRST lb-ENT FIELDS(EntDescription) NO-LOCK
WHERE lb-ENT.EntityMnemonicKey = lv-EntityMnemonicKey:
ASSIGN op-DBTable = lb-ENT.EntDescription.
END.