Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to use the "In" operator in Calculated View Filter Expression

$
0
0

Hi Peter,

 

Appreciate this is a big ask being so long ago, but I'm having no joy with passing multiple distinct values of a single input parameter via odata, with the following not returning any results.  Not sure if I'm escaping the single quote properly:

 

 

foodstuff.xsodata/InputParams(P_FOODSTUFFID='''1001'',''1003''')/Results?$select=NUTRIENT

 

 

the input parameter is defined as column, not checked for multiple entries (this fails the odata service if checked), and references the column FOODSTUFFID, and the filter expression:

 

in("FOODSTUFFID",'$$P_FOODSTUFFID$$')

 

 

FYI the following SQL works when querying multiple values against same calc model used in odata service:

 

SELECT TOP 400 "FOODSTUFFID", "NUTRIENT", "NAME", "GROUPID", "SOURCE", "MEASURE_TYPE", "MEASURE_AMOUNT", "MEASURE_GRAMS", sum("NUTRIENT_VALUE") AS "NUTRIENT_VALUE" FROM "_SYS_BIC"."mypackagepath.models.calculation/Foodstuff" ('PLACEHOLDER' = ('$$P_FOODSTUFFID$$', '1001'',''1002'',''1003')) GROUP BY "FOODSTUFFID", "NUTRIENT", "NAME", "GROUPID", "SOURCE", "MEASURE_TYPE", "MEASURE_AMOUNT", "MEASURE_GRAMS"

 

Many thanks for any help.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>