Leading Zeros SQL query

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

Reply to
wessanders
Loading thread data ...

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:

Reply to
GregDxb

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.