sqlteiid

TEIID Function not returning Value


I have created following simple function to return a count value but its not returning when executing from SQL:

CREATE VIRTUAL FUNCTION GET_COUNT (IN value string) 
    RETURNS integer AS
    BEGIN
            SELECT count(variable) from source.navtiveTable where variable = value;
    END

I get NULL result when I execute the above function in SQL. however I get a result when executing the above query in native model. Why am I getting null result ?


Solution

  • Might be because value is a reserved keyword. The syntax looks correct as far as I can see.