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