last indexOf in a query activty

Avatar

Avatar

maurizio_coro

Avatar

maurizio_coro

maurizio_coro

12-03-2019

Hi experts!

Is there any quick  way to get the last index of a   string in ax  "expression" field of a query activity?

the purpose is to display the last word in a  field, so I'm wondering if I can get the last "space" ad use the "Right" function.

Or maybe do you know other way to get it?

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

wodnicki

MVP

Avatar

wodnicki

MVP

wodnicki
MVP

18-03-2019

Hi,

Charindex() will return the first position. If you have a (low) upper bound of occurrences you can case-when them all out, or more simply expose your rdbms' regular expression function.

Thanks,

-Jon

Answers (0)