Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

last indexOf in a query activty

maurizio_coro
Level 3
Level 3

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

1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

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

View solution in original post

1 Reply
wodnicki
Correct answer by
Community Advisor
Community Advisor

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

View solution in original post