Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: LTRIM or TRIM Function

Re: LTRIM or TRIM Function

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 14 Feb 2005 01:55:30 -0800
Message-ID: <1108374930.798460.172710@o13g2000cwo.googlegroups.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US