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("0000", image_location)
end if

Looking at the mysql manual, it just says to do ranges as # to #, in
this case 1 to 9, but I am getting a syntax error.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to