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
Ineedtoalwayssearchfortheremainderofthestringafterthelast"" " ie for the first line I needed to get all " System access " / strong>
In the second row I need to get ONLY "People's Pharmacy" because 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. I already posted this question here for some time but I did not get results.
Thank you.