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