Current Position:Home > Calling User definedTable valued function in Select

Calling User definedTable valued function in Select

Update:10-11Source: network consolidation
Advertisement
Hello,
I Created a UserDefined Table Valued Function in HANA.
I need to call it in Select Statement Statement.
For Example
Select Func(col1) as test,col2 from tablename;
While using UserDefined Table Valued Function in above select statement
I am getting following error
cannot use procedure or table function in select projection
Please help me

The Best Answer

Advertisement
Dont think you can do that Krishna,
A Tabel UDF is expected to return a row of results and not just a scalar value. A SELECT <value> on the other hand can only expect a single value. Maybe you could try SELECT  (SELECT TOP 1 <column name> from TABLEUDF() ) from....
Regards,
Nehal.