I am working with a 3 way join that is giving me a cartesian result that I do not want. :-( There are two unique IDs in A and B. C provides the translation from ID to NAME. The TIME is stored in both A and B.
This query:
select C.NAME,
A.TIME,
A.DATA1, A.DATA2, A.DATA3...
How can I get awk to print out the leading zeros when padding a field width?
The command:
awk '
BEGIN{
v_nmbr=1
printf( "%3d\n", v_nmbr )
}
'
outputs 1.
I would like to get 001.
We hope that this helps.
Regards,
NPI
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.