Good morning, I need a way to get all the rest of a string after a given character, for example, I have the following database
Ineedtoalwaysfetchtheremainderofthestringafterthelast"" ", ie for the first line I needed to get all " System access " "" "
In the second row, I need to get "People's Pharmacy" as it is after the LAST
So far I have the following query
select TOP 10 COUNT(SolID) as soma, SolCaminho as caminho
from Solicitacao where
DATEPART(m, SolData) = DATEPART(m, DATEADD(m, 0, getdate()))
AND DATEPART(yyyy, SolData) = DATEPART(yyyy, DATEADD(m, 0, getdate()))
and UsuIDGrupoRespConclusao = 2655
group by SolCaminho order by soma desc
I tried to do SUBSTRING with CharIndex but I did not succeed.