Hay un error: ERROR: column "respaldan" does not exist LINE 25: WHERE n.idnota =respaldan ^