MySQL includes a number of built-in string manipulation functions that are similar to the functions provided by Web scripting languages such as PHP. You can use these functions in both the "SELECT" ...
@%1-3 are variables that's replaced by our system. So far so good. Here's the tricky part. A new requirement is to send a part of the JobNo (@%2), to another field as well, that we might call LineNo.