The following example shows how to use query function calls in a place where lists can appear (for example, in
FOR
statements):VARIABLES
EVENT e;
INTEGER status;
.
.
FOR e IN stm_r_ev_name_of_ev (’EV*’, status)
LOOP
WRITE (’\n’, stm_r_ev_name (e, status));
END LOOP;This example writes out the name of all the events in the database whose name begins with the string EV.