Skip to Content
avatar image
Former Member

field or table alias is not allowed as an input of table functions

Hi,

I am trying to write a query something like the following in a procedure but it gives me error SAP DBTech JDBC: [7] (at 1669): feature not supported: field or table alias is not allowed as an input of table functions:

SELECT

TempEX."M1",

TempEX."M2",

ex."E_ID",

TempEX."B_ID",

TempEX.B_Text,

ADD_SECONDS(TempEX."StartDateTime",60) AS StartDateTime,

ex."E2ID" AS ItemID,

ex."ExName" AS ItemText,

(SELECT ITEMS FROM SCHEMA."FN_GetItemCategories"(ex."E2ID",'Exhibitor','')) AS P,

TempEX."MinTime",

TempEX."Radius",

ex."Size",

FROM SCHEMA."Escalators" ex INNER JOIN

(

SELECT .............................

) TempEX

ON ex."E2D"=TempEX."ItemID"

ORDER BY ex."E2ID",TempEX."StartDateTime";

Inside my function i am just trying to return a string after doing some select queries and operations. I cannot use scalar UDF because it does not support SELECT queries and if i make it table UDF then i get the above specified error. Can anyone suggest what am i missing or an alternative to achieve my purpose?

TIA.

Nikhil

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jun 07, 2015 at 09:44 PM

    Depending on how you generate the Item categories you may simply use a join instead.

    - Lars

    Add comment
    10|10000 characters needed characters exceeded

    • Please be more concrete.

      What does your input data look like? What should be the outcome?

      Make an example. Don't just describe what you want to happen, but show it.

      Table functions can be used, well, like tables. Not sure what you are asking or where you are stuck.

      - Lars