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