I am trying to access an OData source provider, specifically an analytic view exposed by SAP HANA via Odata service. I'am applying a filter containing a number on odata but I am getting an error saying that using the number is not supported because of
"Operator 'eq' incompatible with operand types 'Edm.Decimal' and 'Edm.String'
this is how I am accessing the resource:
analyticView.xsodata/analyticView?$select=AMOUNT_SOLD,FAMILY_NAME&$filter=SALE_PRICE%20eq%20'323.7'&$format=json
I also tried to remove the quotes from the number
analyticView.xsodata/analyticView?$select=AMOUNT_SOLD,FAMILY_NAME&$filter=SALE_PRICE%20eq%20323.7&$format=json
but I am getting this error:
"Operator 'eq' incompatible with operand types 'Edm.Decimal' and 'Edm.Double'."
Could you please check what's the problem and how to resolve it.
You can use filter expressions in OData requests to filter and return only those results that match the expressions specified. You do this by adding the $filter system query option to the end of the OData request.
A URL used by an OData service has at most three significant parts: the service root URL, resource path and query options.
You can try adding an M
to the end of the number you are filtering on.
$filter=SALE_PRICE%20eq%20323.7M
See here for more information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With