You can translate the question and the replies:

Read URL from reverse

Dear all, i need to parse the url and get the last part of the string. for example : https://community.denodo.com/answers/question/manage or https://community.denodo.com/answers/question/manage/ i need to read the part "manage" i was earlier trying to same with charindex and right in SQL but VQL don't have these functions. looking forward to support. Thanks in advance. Kiran Tauqir
user
19-10-2022 03:12:08 -0400
code

1 Answer

Hi, For your scenario, I would use [**POSITION()**](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/functions/text_functions/text_functions#position) and [**SUBSTRING/SUBSTR()**](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/functions/text_functions/text_functions#substring-substr) functions in Virtual DataPort for fetching the final word from any url. For example, ``` SELECT SUBSTRING('https://community.denodo.com/answers/question/manage' FROM POSITION('manage' IN 'https://community.denodo.com/answers/question/manage')) AS WORD ``` This VQL when executed from the VQL shell will return only the ‘manage’ word as expected, as the **SUBSTRING()** and **POSITION()** function can be used as a replacement for the CHARINDEX() and RIGHT() functions considering your requirement. You could refer to the section [**Functions**](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/functions/functions) of the Virtual DataPort VQL Guide for more information about various functions offered by Denodo. Hope this helps!
Denodo Team
20-10-2022 02:12:28 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here