Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top