Documente Academic
Documente Profesional
Documente Cultură
replaced with a character string. Syntax: %Join({COMMON_KEYS | COMMON_FIELDS}, join_recname [ correlation_id1], to_recname [ correlation_id2] [, override_field_list]) where override_field_list is an arbitrary-length list of fields to be substituted in the resulting text string, in the form: field1 [, field2] . . . %List The %List function expands into a list of field names, delimited by commas. Which fields are included in the expanded list depends on the parameters passed to the function. Syntax: %List({FIELD_LIST | ORDER_BY | SELECT_LIST | NONULL_FIELDS | SELECT_LIST_NOLONGS | FIELD_LIST_NOLONGS}, recordname [ correlation_id]) %Select The %Select function identifies the State Record fields to hold the values returned by the corresponding SELECT statement. A %Select is required at the beginning of any and all SELECT statements. For example, you need one in the Flow Control Actions as well as one in the SQL Actions that contain a SELECT. In other words, you use %Select to pass values to the State Record buffers. You use the %Select construct to pass variables to the State Record and you use the %Bind construct to retrieve or reference the variables. Syntax: %Select(statefield1[, statefield2][, statefieldN]) SELECT field1[, field2][, fieldN] %SelectInit This meta-SQL construct, %SelectInit, is identical to %Select with the following exception. If the SELECT returns no rows, %SelectInit reinitializes the buffers. In the case of a %Select and no rows are returned, the State Record fields retain their previous values. When you use %SQL in a statement, Application Engine replaces it with the specified SQL object. This allows commonly used SQL text to be shared among Application Engine and PeopleCode programs.
%SQL
%Table
The %Table function returns the SQL table name for the record specified with recname. The basic syntax is as follows: %Table(recname) If the record is a temporary table and the current process has a temporary table instance number specified, then %Table resolves to that instance of the temporary table.
%TruncateTable The %TruncateTable meta-SQL construct is functionally identical to a DELETE SQL statement with no WHERE clause, but it is faster and requires fewer resources on databases that support bulk deletes. If youre familiar with COBOL, this construct is an enhanced version of the COBOL meta-SQL construct with the same name. The basic syntax for %TruncateTable is: %TruncateTable(table name) %UpdateStats Application Engine replaces this meta-SQL construct with a platform-dependant SQL statement that updates the system catalog tables used by the database optimizer in choosing optimal query plans. We intend that you use this construct after your program has inserted large amounts of data into a temporary table that will be deleted before the end of the program run. This saves you from having to use dummy seed data for the temporary table and having to update statistics manually. The basic syntax for %UpdateStats is: %UpdateStats(table name)