Sorry,
should be the lpad function:
http://www.mysql.com/doc/en/String_functions.html
LPAD(str,len,padstr)
Returns the string str, left-padded with the string padstr until str is
len characters long. If str is longer than len' then it will be
shortened to len characters.
mysql SELECT
What you want is the rpad function:
http://www.mysql.com/doc/en/String_functions.html
RPAD(str,len,padstr)
Returns the string str, right-padded with the string padstr until str is
len characters long. If str is longer than len' then it will be
shortened to len characters.
mysql SELECT
select req_number,
right(concat('00',trim(req_number)),6) as sort_req,
case
from req
order by sort_req;
Haven't tried it but it should work.
=C=
*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*
-Original Message-
From: Norris, Joseph [mailto:[EMAIL
Thanks - this is even better - I will give it a try.
-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 6:19 AM
To: Norris, Joseph; Mysql_List (E-mail)
Subject: RE: WoW SQL is something!
select req_number,
right(concat('00',trim
Colin,
According to the docs this function wants a string and when I use the field
name it says unknown column.
Thanks anyway.
-Original Message-
From: Colin Kettenacker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 5:32 PM
To: Mysql_List (E-mail)
Subject: Re: WoW SQL