data type incompatible in the substract operator

Hi All,

Why this Query error in Service Studio P11 but in P10 it's work. The entity data type of this field is Text

Query like this

    {BIKE}.[YELLOW03] - {BIKE}.[PURPLE01]
    from {CAR}, {BIKE}

Thank You All.

Rank: #64

Hi Adam,

From the error message it seems you are trying to do a subtraction operation of fields (yellow3 and purple01) which are not numbers.

Are you trying to subtract them? If so, they should be integer / long integer / decimal field types.

If you are trying to produce a text with the two fields with a dash in between, you should have {BIKE}.[YELLOW3] + " - " + {BIKE}.[PURPLE01]

Hope it helps.



Rank: #33988

Hi João,

Actually thanks for your respond, but i try in Service Studio version 10 with same query  it's work, why in Service Studio version 11 getting error



Hi Kane,

Please check the datatype of those two  column in your version 11 entities. There can be the issue of the changed datatype. 

If everything is as service studio 10 then could you please attach the screen shot or the entities and their properties or if could attach the oml that would be helpful to check the error.



Rank: #386

Hi Kane,

Wish you Merry Christmas!!

Based on the error attached, it looks like you are subtracting the text values not numeric. You can only do the CONCATENATION on the text type columns and do any calculations on numeric columns.

Thanks & Regards,


Hi Kane,

As per error you trying to do subtract operation in nvarchar data types which is not possible. If you want to do the same you have to change the data type of both attributes.


Shashikant Shukla

Rank: #2

Hi Kane,

It is important to understand that the error as shown (everything after "ShowDataList:") is the actual error coming from the database. Especially because this is an advanced query, the Platform version has nothing to do with it. Also, the error clearly shows what's wrong, you are trying to subtract two columns that aren't numeric, as others already have suggested.

That said, the query itself is also very fishy, since you are doing a full outer join of the two Entities, having them both in the FROM without any WHERE condition.