Good afternoon people,
Sorry for my english first and I have a problem.
I need to get the last occurrence of a char in a string and make the substring from that position.
For example
I have some strings
'Www.google.com'
'Www.bbc.com'
'Www.university.edu'
I need to return now
'com'
'com'
'Edu'
how to make ?
I tried using the Position function in the report studio but the '.' Is in different positions, so I need to get the last occurrence of '.' And use the substring from that point.
Thank you
I would do a string reverse , calculate upto the char that's needed using substr( , . )
and then reverse the final output using strrev again.
Thank you,
But I do not know how to do this reverse calculation.
Position ('.'; [Field]) returns me the first position, but how to return the last?
which db are you using ?
If you want to use cognos function - its REVERSE.
Thanks
NC
https://www.ibm.com/support/knowledgecenter/SSEP7J_10.1.1/com.ibm.swg.ba.cognos.ug_cogtr.10.1.1.doc/c_textfunctions_tr.html
ITS WORKS.... thank you so much.
you save my day.
Glad its working.
Thanks,
NC