Error while updating existing record in postgresql

Hi im getting this error: any idea?

update "tbl_statuslaboral" set "sector" = $1, "empresa" = $2, "posicionlaboral" = $3, "statuslaboral" = $4, "fecha_actualiza" = $5, "TienePension" = $6, "CondicionPension" = $7, "TieneHipoteca" = $8, "CondicionHipoteca" = $9, "MontoPension" = $10, "MontoHipoteca" = $11, "HipotecaCompartida" = $12, "StatusHipoteca" = $13, "ComentarioHipoteca" = $14, "SSxM" = $15, "SExM" = $16, "ruc" = $17, "dv" = $18, "nombrelegal" = $19, "actividaddeempresa" = $20, "fechacreacionempresa" = $21, "arealaboral" = $22, "NombreJefe" = $23, "cantidaddeempleados" = $24, "ISRxM" = $25 where "idclave_nombre" = $26 returning * - invalid input syntax for type integer: ""

Well, the error message suggests that one of those fields you're updating is a number but your query has passed in an empty string "" instead of a null

Can you check the expanded update statement in the retool editor and see which one is being treated as a string (might be more than 1)?

If you're using number input components then it shouldn't be returning strings - if your input data needs to be formatted before the update then a transformer might be a good option.

1 Like

Ty i was using text field instead of number