I have two substring queries that both work on their own but I can't seem to get the syntax right when I try and put them together into one query.
The first one is to remove the extension from a string
SUBSTRING(URI, 1, CHARINDEX('.',(URI)))
The second one is to return only the title of the page in a web address
REVERSE(SUBSTRING(REVERSE(URI), 1, CHARINDEX('/',REVERSE(URI))))
Whenever I try to put them together I get a syntax error or I get two seperate results, one without the extension and one containing just the title.
Thanks for your help.
The first one is to remove the extension from a string
SUBSTRING(URI, 1, CHARINDEX('.',(URI)))
The second one is to return only the title of the page in a web address
REVERSE(SUBSTRING(REVERSE(URI), 1, CHARINDEX('/',REVERSE(URI))))
Whenever I try to put them together I get a syntax error or I get two seperate results, one without the extension and one containing just the title.
Thanks for your help.