[EMAIL PROTECTED] ("Jerry Jones") wrote in
news:[EMAIL PROTECTED]:
> I am trying to do an update, where item numbers 1-9 get four 0's added
> to the front, 10-99 get three 0's etc.
mysql> HELP LPAD
Name: 'LPAD'
Description:
Syntax:
LPAD(str,len,padstr)
Returns the string str, left-padded with t
I am trying to do an update, where item numbers 1-9 get four 0's added
to the front, 10-99 get three 0's etc.
Here is my query so far:
if image_location = 1 to 9
then update inventory_items set image_location = concat("", image_location)
end if
Looking at the mysql manual, it just says to do