In this case, the length of both first and the second fields vary. The first field is a number that may be one, two, three or four places in length - it's the only field of interest. Since it may be up to four places in length, then I am using a substring that uses a count of four from the startindex of zero. Since the number may be one, two, three or four places in length, then I would normally nest the substring function within a trimcharcter function to remove whatever output appears in cases when the number is a one, two, or three place number. This has worked in cases where the following output is always consistent, say quotes, or spaces, or something that always appears next in the case of a shorter number. However, in this case, the output following the first field also varies, both in content as well as length - it is also a variable number which may be one, two, three, or four places in length.
One key thing is that there is a delimiter between the two numbers - a comma was the chosen delimiter for the SQL output. If it were possible to extract what appears before the first delimiter, regardless of the length of the field, that seems like it would be one possible solution, but so far I haven't found a way to do that with the existing functions within VC. You mentioned using the substring function, but in this case the length of the string is variable.
To be more specific, the job is running a SQL SP that monitors a queue every 15 minutes - it's a number changes each time the job runs - it could be 1, or 100, or 1000 - if we can monitor it with VC, then we can get an alert once it crosses a predefined threshold. The ability to identify specific output by delimiter, not just by length from a startindex, seems like it could be useful in dealing with output from SQL.