cancel
Showing results for 
Search instead for 
Did you mean: 

Error with using table function in query

hdolenec
Contributor
0 Kudos

Dear experts,

Kindly help with HANA query. I need to apply table function in existing select statement.

To be specific, I have a document with header table (single row) and row table (multiple rows of that document), and I need to add function with parameters from header and row table to all result rows.

What I tried to do was to cross join function as a table (example below), and also as a subselect, but I get a following error which I don't know to solve

"feature not supported: field or table alias is not allowed as an input of table functions"

SELECT *

FROM HEADER A
INNER JOIN ROWS B ON A."Number" = B."Number"
CROSS JOIN "Function"(A."HeaderData1", A."HeaderData2", B."RowData1", B."RowData2") C

 

Accepted Solutions (0)

Answers (1)

Answers (1)

HakanHaslaman
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error message is indicating that you cannot use table or field aliases as inputs to a table function in HANA DB. In your case, you are trying to use the aliases A and B as inputs to the table function "Function", which is not allowed in HANA DB. To solve this issue, you can try to use the actual table or field names instead of the aliases.