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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: PLsql question

RE: PLsql question

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 13 Nov 2001 09:36:09 -0800
Message-ID: <F001.003C36A8.20011113081018@fatcity.com>

Roland,

You *really* need to review basic sql functions.

Look at the LTRIM and RTRIM functions, and the new one (in 9i?) called TRIM. They do exactly what you are asking.

Like

insert into table1(col1 ,col2)
 select ltrim(col1,' '),ltrim(col2,' ') from table2;

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Tuesday, November 13, 2001 9:40 AM To: Multiple recipients of list ORACLE-L

Hallo,

How can I write in apl/sql code if I want to make an insert from table one into table two and in one of the fields delete the space in front of the first blank.

For instance It says

1 John
2 Frederic
99 Jimmy

in table one

and I want the pl/sql code to delete the values in front of the names wheninserted into table two
so in table two it would be:
just :

John
Frederic
Jimmy

Thanks in advance

Roland S

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Roland.Skoldblom_at_ica.se

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Nov 13 2001 - 11:36:09 CST

Original text of this message

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