@paulrockliffe wrote:
Thanks that looks like it'll sort me out.
I'd still like to know if it's possible to use the equivalent of a Do Loop within Query Builder as it might be useful in the future, if anyone knows the answer to that?
Not within the GUI tools for sure. You could with a macro language, but it's not an appropriate for this question anyways. An example would be if you had say 100 cols that you need to loop a calculation over. It's usually easier to switch to a data step at that point.
If the value is also a number you can convert it to a numeric and then back to a character using Z8 format to ensure the leading zeroes.
put(input(my_var, 8.), z8.) as padded_variable
GUI tools get you about 75% of the way. You can get another 15% via some workarounds and multiple steps in a GUI that would be a single data step. And the last 10% requires pure code. In my experience that's true of most GUI analytical tools in the market today.
... View more