Hello, I am trying to get the index of the Nth character inside a varchar(MAX). Right now I am cutting off the front end of the varchar so I only have to check for the first but With extremely large varchars the process is getting way too slow. I would like to parse through the varchar(max) and just keep track of what index I am at and get the next character I want AFTER that index. If I could do this without having to constantly cut off the front of a large varchar constantly I think it would increase performance a good amount. Thanks.
EDIT: Right now to parse a large amount of text I use CHARINDEX to get the index of the char, THEN I SUBSTRING the text to remove up to that first index. Now I call CHARINDEX again (which effectively retrieves the 2nd index of that character inside the text). However, this SUBSTRINGING is very taxing on the system and I want to avoid it.
EDIT: Ah, sorry my title was very misleading, it should be more straight forward now.