And to maximize the fun in your change request (and guarantee correct behavior in the old situation) I'd wrap the 2 formulas that C0rinthian wrote in a CASE block that checks if there is at least one occurrence of "." in the value you have inbound.
No occurrence: Entire string to jobNo and null into lineNo
Otherwise: First part to JobNo and second part to lineNo
One remark: The formula where you calculate the second part as counting from the right will only work correctly if there is exactly one occurrence of ".". With "123.45.67" as inbound data, it will split into "12" and "67". I'd change the first index of the substr function from "1" to the position of the "." occurrence + 1 and work to the end of the inbound value. That way a value like "123.45.67" would be split into "123" and "45.67".
Can sound like nitpicking, but since you implement the splitting logic (and not the team that supplies you the values), you'd better check for boundary cases in your logic.
In the best case when some wrong data is supplied like the "123.45.67", you have not lost any data and if they observe the unexpected "45.67" in the lineNo, then you can point them to incorrect inbound data.
Otherwhise, the invalid data might even go unnoticed.
Probably overkill, but I've been integrating data flows between different systems for too long and have developed an aversion for BIBO systems
No occurrence: Entire string to jobNo and null into lineNo
Otherwise: First part to JobNo and second part to lineNo
One remark: The formula where you calculate the second part as counting from the right will only work correctly if there is exactly one occurrence of ".". With "123.45.67" as inbound data, it will split into "12" and "67". I'd change the first index of the substr function from "1" to the position of the "." occurrence + 1 and work to the end of the inbound value. That way a value like "123.45.67" would be split into "123" and "45.67".
Can sound like nitpicking, but since you implement the splitting logic (and not the team that supplies you the values), you'd better check for boundary cases in your logic.
In the best case when some wrong data is supplied like the "123.45.67", you have not lost any data and if they observe the unexpected "45.67" in the lineNo, then you can point them to incorrect inbound data.
Otherwhise, the invalid data might even go unnoticed.
Probably overkill, but I've been integrating data flows between different systems for too long and have developed an aversion for BIBO systems