RE: whitespaces
Varchar2 will not leave any trailing blank spaces. Only Char field does. See this example Create table temp ( Co1 Varchar2(5) Col2 Char(5) ); Insert into temp Values('KING', 'KING'); Select col1, length(col1), col2, length(col2) from temp COL1 LENGTH(COL1) COL2 LENGTH(COL2) - - KING 4 KING 5 Cheers Fazal --- Jon Baker <[EMAIL PROTECTED]> wrote: > use the rtrim function. > > rtrim(char[,set]) - char, with final characters > removed after the last > character not in set. set defaults to ' '. > > > i.e.: > > update set =rtrim(); > > > > Jon Baker > Database Architect > <[EMAIL PROTECTED]> > www.netsec.net > > > > > -Original Message- > Sent: Thursday, February 14, 2002 9:08 AM > To: Multiple recipients of list ORACLE-L > > > Hi, > > What query can i run to to eliminate trailing > whitespaces. e.g. i have > 'abc ' and want to update the table so any such > data is set without the > whitespace, in this case 'abc' > > the fiels is varchar2 > 8.1.7. > > cheers > > -- > Please see the official ORACLE-L FAQ: > http://www.orafaq.com > -- > Author: > INET: [EMAIL PROTECTED] > > 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: [EMAIL PROTECTED] (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). > = Abul Fazal Production Support Services - Quantum Leap Standard Charted Bank Singapore HP : 65-94887900 __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Abul Fazal INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: whitespaces
update mytable set myfield = rtrim(myfield) ; That's the simple answer. If most of your fields do not have trailing spaces, then: update mytable set myfield = rtrim(myfield) where myfield like '% ' ; If your table is large, you'll need to watch out for rollback issues, etc. I'm sure there are mails in the archive that address ways to do massive updates in chunks. HTH, Steve - Steven Monaghan Oracle DBA / Cold Fusion Developer MSC Industrial Direct Co., Inc. http://www.mscdirect.com - -Original Message- Sent: Thursday, February 14, 2002 9:08 AM To: Multiple recipients of list ORACLE-L Hi, What query can i run to to eliminate trailing whitespaces. e.g. i have 'abc ' and want to update the table so any such data is set without the whitespace, in this case 'abc' the fiels is varchar2 8.1.7. cheers This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law. If you are not the intended recipient, please do not read, copy, use or disclose the contents of this communication to others. Please notify the sender that you have received this e-mail in error by replying to the e-mail. Please then delete the e-mail and destroy any copies of it. Thank you. -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Steven Monaghan INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: whitespaces
Try update table_name set field_name = rtrim(field_name); I think the Right Trim should clear off the trailing spaces. -Original Message- Sent: Thursday, February 14, 2002 8:08 AM To: Multiple recipients of list ORACLE-L Hi, What query can i run to to eliminate trailing whitespaces. e.g. i have 'abc ' and want to update the table so any such data is set without the whitespace, in this case 'abc' the fiels is varchar2 8.1.7. cheers -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Kevin Lange INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
RE: whitespaces
Title: RE: whitespaces use the rtrim function. rtrim(char[,set]) - char, with final characters removed after the last character not in set. set defaults to ' '. i.e.: update set =rtrim(); Jon Baker Database Architect <[EMAIL PROTECTED]> www.netsec.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:08 AM To: Multiple recipients of list ORACLE-L Subject: whitespaces Hi, What query can i run to to eliminate trailing whitespaces. e.g. i have 'abc ' and want to update the table so any such data is set without the whitespace, in this case 'abc' the fiels is varchar2 8.1.7. cheers -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).
whitespaces
Hi, What query can i run to to eliminate trailing whitespaces. e.g. i have 'abc ' and want to update the table so any such data is set without the whitespace, in this case 'abc' the fiels is varchar2 8.1.7. cheers -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).