tag:blogger.com,1999:blog-2904192386692843423.post6452418560728452867..comments2024-01-20T18:35:00.592+05:30Comments on IT Developer Zone: Find nth Occurrence of Character SQL ServerSandeep Mittalhttp://www.blogger.com/profile/02880471130771695348noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2904192386692843423.post-76106286537841381162012-04-17T11:02:05.876+05:302012-04-17T11:02:05.876+05:30Dear Shireesha
Thanks for the information. Good p...Dear Shireesha<br /><br />Thanks for the information. Good point noticed. I have updated the function to handle the same.Sandeep Mittalhttps://www.blogger.com/profile/02880471130771695348noreply@blogger.comtag:blogger.com,1999:blog-2904192386692843423.post-78573233207368771982012-04-16T22:05:52.063+05:302012-04-16T22:05:52.063+05:30Thanks for the above code. It really helps. But I ...Thanks for the above code. It really helps. But I found one thing, which is, it keeps on looping if the @occurrence_no is greater than what we have in the string. For example, if I have the same string as you mentioned in above example, but I have occurance_no as 4 or 5, then it would loop through again and get me 1st of 2nd value again. Is there anyway to return -1 or so when it does not find the occurance?<br /><br />Thanks again.Shireeshahttps://www.blogger.com/profile/10442715473707969493noreply@blogger.com