>That worked! Thanks. I hadn't thought of the value possibly being all zeros. What's the best way to trap for that?
I guess just add one more OR condition and explicitly check for this. Though do we also want to handle 1, 2 or N less than 6 "0", e.g.
cJobNo = '0' or cJobNo = '00' ?
Let me think a second, the simplest solution would be
or ltrim(tcJobNo) in ('0','00','000','0000', etc.) -- let me think of a better solution.
If it's not broken, fix it until it is.
My Blog