I am trying to select output columns of a Function into a Table. Routine is executing fine as standalone but when I select its results into a Table, I get an error. I am executing the following:
select node_id C1 , resourcename C2 , callshandled C3 FROM TABLE(function sp_details_agent('2022-08-16 21:00:00','2022-08-17 20:59:59') );
Simple Execution of routine is okay i.e.
Execute function sp_details_agent('2022-08-16 21:00:00','2022-08-17 20:59:59')
// above execution gives 03 column output : node_id | resourcename | callshandled
Error is: SQL Error (-217): Column (node_id) not found in any table in the query (or SLV is undefined).
Please advise what I am missing.