SQL experts? Adding Leading Zeros on some Barcode Items

I've imported about 4,000 items into RMS but first edited the .csv in excel, then exported to CSV to do the import. I just realized that the leading zero on some barcodes (item numbers) were taken off in excel & didn't make it to the final csv file...

Any SQL experts have a suggestion? Need to do do something like this (that works)...

UPDATE ITEM_BARCODE SET ITEM_BARCODE= 0+ITEM_BARCODE Where ITEM_BARCODE size =< 10

Barcode size needs to be 11 long (we are not sending the last 'check digit' from the UPC.

Reply to
RobbieSymmetryAVcom
Loading thread data ...

The solution in Excel to stop the leading zero from falling off is the format the column as a TEXT value type before you enter the data. I'd make the fix in Excel in another column rather than making the fix in RMS. Let's say your ILCs are in column A. In another column, use a formula like this:

=if(len(A2) I've imported about 4,000 items into RMS but first edited the .csv in

Reply to
Jason

=CONCATENATE(0,A1) also works in excel to add a zero in front of a number and since it is a text function it will keep the leading zero

Barry

Reply to
Barry L

Very true - plus you don't have to format the column as text if you paste special / values because you are pasting text, not a number.

Reply to
Jason

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.