create or replace
n IN NUMBER
RETURN NUMBER IS
val NUMBER :=1;
tem number :=n;
while tem>1 LOOP
I create a function like this.
And I test it in sql developer(ctrl-F10), and get the right result.
When I use the function in SQL: select factorial(10) from dual; (I use log as function owner, exactly same connection as I test the function with ctrl-F10)
cames the error message:
[TimesTen][TimesTen 22.214.171.124.0 ODBC Driver][TimesTen]TT2818: Unknown function FACTORIAL. If this is a PLSQL function note that such functions are not yet supported in SQL statements. -- file "saCanon.c", lineno 24079, procedure "inferExprTNFunc()"
Does that means timesten doesn't support user defined function in SQL statements?