on 06-05-2015 8:59 AM
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
Depending on how you generate the Item categories you may simply use a join instead.
- Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
Inside my ItemCategories function i am trying to coalesce values of a column based on some filter conditions. I am not able to understand how do i achieve the same using one more join in the main query instead of function.
BTW i have simple question that scalar functions do not allow select queries, so i made them as table functions. Now how do i use the table functions inside my select queries?
Thanks a lot for your help
Nikhil
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.