create or replace function adam.fn_fco_get_dato_col(p_compania   in char,
                                                    p_trabajador in char,
                                                    p_coleccion  in char)
  return char is
  Result char;
begin
  begin
    select 'X'
      into result
      from rel_trab_coleccion r
     where r.compania = p_compania
       and r.trabajador = p_trabajador
       and r.coleccion = p_coleccion;
  exception
    when NO_DATA_FOUND then
      result := ' ';
      return(result);
  end;

  return(Result);
end fn_fco_get_dato_col;
/
