The column SQLRecord field property specifies the name of the database table column that is associated with the field.
The default is the name of the field. EGL uses the column name and related field to create default SQL statements (see "SQL data access").
Record CustomerRecordPart type SQLRecord {tableNames = [["CUSTOMER"]]}
customerNumber INT {column = "Column" :: "01"};
...
end
record Q type SQLRecord
myField int { column = "COLUMN01 || 10 + COLUMN02 * 5" };
end
If you have coded a complex value because you want to generate an INTO clause for a SELECT statement, consider providing your own INTO clause. For details, see the SELECT statement restriction that is described in "get considerations for SQL."
Record CustomerRecordPart type SQLRecord {tableNames = [["MYSCHEMA.CUSTOMER"]]}
customerNumber INT {column = "MYSCHEMA.CUSTOMER.Column01"};
...
end
customer CustomerRecord{};
get customer with #sql{
select MySCHEMA.CUSTOMER.Column01
from MYSCHEMA.CUSTOMER
where MYSCHEMA.CUSTOMER.Column02 = "AZ"};
In the get or open statement just described, the qualification used for a column name in the SQL SELECT clause must match the qualification used for the corresponding field in the Record part.
column = "\"SELECT\""
A similar situation applies if you use any of those reserved words as a table name.