Re: [firebird-support] String function extract last word from a string

2016-04-12 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
12.04.2016 17:00, 'Checkmail' check_m...@satron.de [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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



AW: [firebird-support] String function extract last word from a string

2016-04-12 Thread 'Checkmail' check_m...@satron.de [firebird-support]
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_m...@satron.de [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





[firebird-support] String function extract last word from a string

2016-04-12 Thread 'Checkmail' check_m...@satron.de [firebird-support]
Hello,

 

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.

 

Thank you.