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