Subject Re: [firebird-support] Anyway to extract a filename from a string
Author Milan Babuskov
Milan Babuskov wrote:
> declare p integer;
> declare q integer;
> q = 1;
> p = -1;
> while (q <= char_length(spath)) do
> begin
> if (substring(spath from q for 1) = '\') then p = q;
> end
>
> if (p > -1) then filename = substring(spath from p+1);

If there is no CHAR_LENGTH you can use STRLEN.

--
Milan Babuskov

==================================
The easiest way to import XML, CSV
and textual files into Firebird:
http://www.guacosoft.com/xmlwizard
==================================