Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: LTRIM or TRIM Function
Paul Izzo wrote:
> I would like to automatically write a users e-mail address based off
> of the first letter of the user's first name combined with the user's
> last name. Ex. Bob Smith = bsmith, Sally Jones = sjones etc...
>
> I don't know which function to use RTRIM or TRIM to take just the
first
> letter of the user's first name.
>
> Does anyone know how to go about this?
Is the full name in one string/column i.e. John Doe or two separate
strings/columns as John and Doe?
In first case you need the combo of SUBSTR, INSTR, LENGTH and maybe
TRIM to trim whitespaces to build up the e-mail address.
In second case you just need SUBSTR and perhaps LTRIM to trim left side
of the string then concatenate 2nd string to the first.
Goto http://tahiti.oracle.com to lookup usage and examples for these.
Regards
/Rauf
Received on Mon Feb 14 2005 - 03:55:30 CST