Subject Re: [ib-support] Name of Returned Field
Author Claudio Valderrama C.
"Nando Dessena" <nandod@...> wrote in message
news:3BFDFFCA.E486DBDF@......
> Helen,
>
> > Or maybe he meant it was stupid to return a result instead of raising an
error...with which I agree.
>
> I see.
> While we're on the subject, I thought that substr was an internal
> function in Firebird RC1.
> Is that true? I can't seem to be able to use it (the parser rejects it).

- substr is a lousy UDF that returns NULL if the second parameter is greater
than the length of the string. I fixed that.
- since it's more natural for me to use (start, length), I created a variant
with a bizarre name, substrlen that behaves like Delphi's built in copy().
- The built-in FB function follows the name and syntax given in the SQL
standard:
substring(string FROM init FOR len)
where init is one-based as it happens in SQL.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing