Hello experts,
We would like to create a UDF function with input parameter a table_name. Please check the below simple example:
CREATE OR REPLACE FUNCTION F_NAME(v_table_name STRING,
v_where_value INT)
RETURNS INT
RETURN SELECT MAX(id) FROM v_table_name WHERE code = v_where_value
However, it seems that v_table_name is not recognized as a table in the Select clause. Could you please suggest a workaround?
Thank you in advance!