I was asked to update add a formula to Gsheets in order to copy/paste and update script to SQL, the problem is that at the time I add single quotes it gets an error
example: first formula works fine:
="UPDATE Equipment SET Correct equipment_name = " & E13& ", Model = "& F13&", Year = "&G13&" WHERE id_equipment = " &A13&";"
It looks like this on the Gsheets Cell:
UPDATE Equipment SET Correct equipment_name = C2 904, Model = HC138, Year = 1972 WHERE id_equipment = 913083823;
Then If I add single quotes to be able to make it a string:
="UPDATE Equipment SET Correct equipment_name = "'" & E13& "'", Model = "'"& F13&"" " , Year = "'"&G13&"'" WHERE id_equipment = "'" &A13&"'";"
Just shows:
ERROR in the Gsheets cell
Is there a solution to this?
Thanks guys
CodePudding user response:
try:
="UPDATE Equipment SET Correct equipment_name = '" & E13& "', Model = '"& F13&"', Year = '"&G13&"' WHERE id_equipment = '" &A13&"';"