Currently Oracle TimesTen does not support calling PLSQL functions from within a SQL statement.
The best work-around is to create a PLSQL function [or package function] and call that function from PLSQL.
Calling a PLSQL function from a host language like JDBC, ODBC, OCI etc is the same in TimesTen as it is for the Oracle RDBMS.
This example works for TimesTen 11.2.2.8.x and 18.1.x:
create or replace function rand_string return varchar2 is
str varchar2(255);
Begin
str := DBMS_RANDOM.string('A', 6);
Return str;
End;
/
set serveroutput on;
declare
s1 varchar2(255);
begin
dbms_output.put_line('Hi');
s1 := rand_string;
dbms_output.put_line('Random string is ' || s1);
end;
/
Hi
Random string is MlDYJy