I have a resultset which has ProductURL stored :
accessoires/abc/285/P187654
accessoires/abc/285/D18765432
accessoires/abc/285/A1876543
I need to get the final part of the URL i.e. anything that is after the final '/' that appears in the URL.
I have a function which gives me the LASTINDEX :
SELECT [LAST_INDEX] (ProductURL,'/')
But how do I run a Select statment with this function inside a substring:
SELECT Substring(ProductURL,SELECT [LAST_INDEX] (ProductURL,'/'),len(ProductURL))
from data
This does not seem to work? Is there another way to do this?