In the context of SQL, the EGL replace statement puts revised information from an SQL record variable back into a row of a relational database.
The statement produces an SQL UPDATE statement in the generated code. EGL can produce this statement implicitly, based on information and properties in your SQL record variable, or you can embed explicit SQL code in the replace statement using the #sql directive (see #sql directive).
UPDATE tableName
SET column01 = :myField01,
column02 = :myField02,
...
columnNN = :myFieldNN
WHERE CURRENT OF cursor
The following code includes the replace statement. The code comes from the complete SQL program that you can find in Sample EGL SQL program.
try get dept forupdate; dept.description = "Test Engineers"; replace dept; commit(); onException(sqlEx SQLException) sqlFailure(); end