'UDFS - Error using Java to dynamically build sql based on UDF's Parameter
Good morning. I am trying to create a UDF using SQL. I want to use the parameters to build a sql instruction.
create or replace function retcount(TABLEIN string, TABLEOUT string,TYPE string, LISTS string, REPORTABLE string, VERSION string) returns numeric(18,0) as $$ select count(\*) from IDENTIFIER($TABLEIN) $$ ;
Error:ed: SQL compilation error: error line 2 at position 37 (line 63) Session variable '$TABLEIN' does not exist (line 63)
I am expecting to get a count returned from the table referenced by TABLEIN.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
