add number from Json to SQL table in PowerAutomate desktop

222 Views Asked by At

I'm trying to get data from accounting software per Api by PoweAutomate desktop. I get Json object and convert it to custom object. enter image description here Then I assign every atribute to a variable for adding it in sql table. But I have a problem. This number is read with comma and I have further problem to add it as decimal(18,2) to SQL table Error converting data type varchar to numeric. enter image description here enter image description here I wanted to replace comma to point in Python 2 (available in PoweAutomate desktop), but this variable is taken as tuple, I can't even join this elements. I wanted to parse Json object in Pyhton, but have error no module when trying toimport json. May be I should change numeric format enter image description here enter image description here

When I get answer I see dots, than when assigning to variables I see commas. enter image description here I got information from German software, as far as I understand, commas are used. May be I can somehow modify my SQL query to put the data in?

1

There are 1 best solutions below

0
On

I have found the solution - edit the sql query (next task is date format):

INSERT INTO vaouchers(totalGrossAmount(decimal(18,2)) VALUES replace("%totalGrossAmount%",",",".")