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