0
DROP ROUTINE IF EXISTS FilterStr;
// Returns the string AStr with all charachters in AFilter removed
create function FilterStr(AStr varchar(100), AFilter varchar(10))
returns varchar(100) as
begin
  declare s varchar(100);
  declare i integer;
  declare ch varchar(1);
  set s = '';
  set i = 1;
  while i <= char_length(AStr) do
    set ch = substring(AStr from i for 1);
    if position(ch in AFilter) = 0 then
      set s = s + ch;
    end if;
    set i = i + 1;
  end while;
  return s;
end;
Category: 
SQL Functions & Procedures
Current Version: 
1.00
Supported Products: 
NexusDB V2
NexusDB V3
Home