문제

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 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top