Subject AW: [firebird-support] String function extract last word from a string
Author Checkmail
Thanks, I had a more complicated version tested now

for select arbeitsgang from tarbg into :agbefore do
begin
agafter = reverse(agbefore);
agafter = left(agafter, position(' ',agafter));
agafter = reverse(agafter);
suspend;
end

-----Ursprüngliche Nachricht-----
Von: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com]
Gesendet: Dienstag, 12. April 2016 17:08
An: firebird-support@yahoogroups.com
Betreff: Re: [firebird-support] String function extract last word from a
string

12.04.2016 17:00, 'Checkmail' check_mail@... [firebird-support] wrote:
> is it possible to extract the last complete word from a string until
> the last blank? For example “I would like to eat a bacon” In this case I
would like to have the “bacon” as result.

RIGHT(string, POSITION(' ' in REVERSE(string)))

--
WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item on the
main (top) menu. Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at
http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links