Still I can see you are using very time consuming loops.
BARINDEX will soon exceed a value of several thousands units… slowing (if not freezing at all) your system quite much. I can’t figure out why you weren’t reported an error message by the system!
The result is always ZERO because the initial value of XTDF is 0 and you ALWAYS end up there because your loop backwards will always end up catching the value tied to variable i which will always go back i times to when the code started.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok