I have 2 tables one with the general data of Routes and another of Inscriptions of each partner, I want to update the table Routes with the sum of two fields of the table of Registrations and I get the error:
# 1241 - Operand should contain 1 column (s)
This is the code:
UPDATE Rutas set socios = sisocios,
no_socios = nosocios
WHERE codigo_ruta = (select x.numconv,
SUM(x.numsocios) as sisocios,
SUM(x.numinvitados) as nosocios
FROM inscripcion x
where x.situac = 'A'
group by x.numconv)