I need help. I’m trying to fill a table with data from another table, but when I execute the SQL statement, nothing happens. Could you help me formulate the correct SQL clause? Right now, I’m getting the following error: “parse error: unexpected SELECT near Saldo_d”. Below is the statement I’m working on:
INSERT INTO Saldos (Copro, Pro, Fecha, Saldo_d)
SELECT Copropietario, Propiedad, Fecha_pago, Saldo
FROM Control
WHERE MONTH(Fecha_pago) = 12 AND YEAR(Fecha_pago) = 2024 AND Saldo > 0
Thank you in advance for your help!