Leading Zeros SQL query

Jun 27, 2006 1 Replies

I need to add leading zeros to every item in our RMS database that uses UPCs. Is there an SQL query that could accomplish this?



Thanks, Wesley Sanders



Hi wesley , I tried this query and it update my itemlookupcode with leading zero where the barcode format is 9(UPCA) but please backup your data before running this query. and before running this ..try to ask for second opinion...I might miss some files that needed to be updated...

SQL-->

update item set itemlookupcode='0'+ rtrim(ltrim(itemlookupcode)) from item where barcodeformat=9

9=UPCA

I hope it helps :)

" snipped-for-privacy@gmail.com" wrote:

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required