Updating Existing Records vs Bulk Update Via Primary Key Issue

Hi community users, I'm facing an issue to update the record...I just test it with single record update using filter by Id "{{Leads_Table.selectedRow.data.Id}}" and then single update "{{Leads_Table.recordUpdates[0]}}".....It works fine, but when I added the Bulk Records Update Via Primary Key then this error occurs to "SingleUpdate" query.....

Error:
update Seller_Leads set 0 = {"Id":4,"FName":"Mohsin","LName":"Ali","Phone":"13328997043","Email":"austin35@gmail.com","MailingAddress":"test address"}, 1 = {"Id":5,"FName":"Saad","LName":"Toor","Phone":"+13316686489","Email":"toor45@gmail.com","MailingAddress":"700 E 93rd St, Odessa, TX 79765"} where Id = 5 - Unknown column '0' in 'field list'

"Query ran successfully"
statusCode:422
error:"Unprocessable Entity"
message:"update Seller_Leads set 0 = {"Id":4,"FName":"Mohsin","LName":"Ali","Phone":"13328997043","Email":"austin35@gmail.com","MailingAddress":"test address"}, 1 = {"Id":5,"FName":"Saad","LName":"Toor","Phone":"+13316686489","Email":"toor45@gmail.com","MailingAddress":"700 E 93rd St, Odessa, TX 79765"} where Id = 5 - Unknown column '0' in 'field list'"
data:null
estimatedResponseSizeBytes:471
resourceTimeTakenMs:236
isPreview:false
resourceType:"mysql"
lastReceivedFromResourceAt:1669812977212
source:"resource"

Hmmm, can you send a screenshots showing all of your query settings?



@bradlymathews , these are the queries for both single and bulk updates....I'm a new to Retool learning...Thanks

It looks good to me.

@victoria , Tag. What are we missing here?

Hello hello! Hmm I've seen this error when a column name being passed in with recordUpdates doesn't exist as a column in your db table.

If you click in to the "Array of records to update" field to take a look at what the data being passed in looks like, do all columns exist in your db table?

1 Like

That error message also seems to have come up here: http://community.retool.com/t/cellchangehandler/13330/5

Let me know if these setups sound similar to yours, or if it's a completely different issue!