Facing Error while using Adv SQL "error converting nvarchar to data type numeric."
Application Type
Service Studio Version
11.14.13 (Build 59808)

The issue i,m facing is while using advance sql for updating a table for storing data in a text attribute which comes as an output for the Multiplication of (text and decimal).

let us consider three attributes  x,y,z.

X= text , y= text and z= decimal.

so , im trying to perform an operation as

 case 1: -update {tablename}  set {tablename}.[x]={tablename}.[y]*{tablename}.[z]

where  {tablename}.[ID]IN (300 values / IDS were provided in condition)

case 2: - 

update {tablename}  set {tablename}.[x]=cast (COALESCE ({tablename}.[y],0) as int)*{tablename}.[z]

where  {tablename}.[ID]IN (300 values / IDS were provided in condition)

Both the cases were not working and im ended up with an error : -

Database returned the following error: Error in advanced query SQL1: Arithmetic overflow error converting nvarchar to data type numeric. Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0. The statement has been terminated.

Hi Jaswanth,

Try setting the Expand Inline property to Yes for the Ids input parameter.

Best Regards


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.