Insert with prefix

2005-07-27 Thread Scott Purcell
Hello, I have the following dilemma, that I do not know how to handle. I have the need for a table where I create a identifier. The identifier consists of a two character string, eg: UP + the next AUTO_INCREMENT Here is what I have. category_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,

Re: Insert with prefix

2005-07-27 Thread Eric Bergen
Try this: concat('UP', lpad(category_id, 6, '0')); Scott Purcell wrote: Hello, I have the following dilemma, that I do not know how to handle. I have the need for a table where I create a identifier. The identifier consists of a two character string, eg: UP + the next AUTO_INCREMENT Here is

Re: Insert with prefix

2005-07-27 Thread SGreen
Eric Bergen [EMAIL PROTECTED] wrote on 07/27/2005 05:03:40 PM: Try this: concat('UP', lpad(category_id, 6, '0')); Scott Purcell wrote: Hello, I have the following dilemma, that I do not know how to handle. I have the need for a table where I create a identifier. The identifier