Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: trim(both) ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 7 Topic 3438 of 3631
Post > Topic >>

Re: trim(both) problem?

by fhevia@[EMAIL PROTECTED] ("Fernando Hevia") Apr 25, 2008 at 06:03 PM

> -----Mensaje original-----
> De: pgsql-sql-owner@[EMAIL PROTECTED]
 
> [mailto:pgsql-sql-owner@[EMAIL PROTECTED]
 En nombre de Stephan Szabo
> Enviado el: Viernes, 25 de Abril de 2008 17:46
> Para: Emi Lu
> CC: pgsql-sql@[EMAIL PROTECTED]
> Asunto: Re: [SQL] trim(both) problem?
> 
> On Fri, 25 Apr 2008, Emi Lu wrote:
> 
> > Hi,
> >
> > Isn't this a bug about trim both.
> >
> >   select trim(both '<BR/>' from '<BR/>ROI Engineering Inc.');
> >          btrim
> > ---------------------
> >   OI Engineering Inc.
> > (1 row)
> >
> >
> > "R" is missing? How?
> 
> Trim doesn't do what you think it does. The '<BR/>' in the 
> above is not a string to remove it is a list of characters to 
> remove.  Thus, the R is removed as it matches a character given.
> 

You could probably use instead:

select replace('<BR/>ROI Engineering Inc.', '<BR/>', '')



-- 
Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
 




 7 Posts in Topic:
trim(both) problem?
emilu@[EMAIL PROTECTED]   2008-04-25 16:33:49 
Re: trim(both) problem?
tgl@[EMAIL PROTECTED] (T  2008-04-25 16:44:30 
Re: trim(both) problem?
sszabo@[EMAIL PROTECTED]   2008-04-25 13:45:59 
Re: trim(both) problem?
fhevia@[EMAIL PROTECTED]   2008-04-25 18:03:14 
Re: trim(both) problem?
tgl@[EMAIL PROTECTED] (T  2008-04-25 17:26:27 
Re: trim(both) problem?
emilu@[EMAIL PROTECTED]   2008-04-28 09:19:03 
Re: trim(both) problem?
chestercyoung@[EMAIL PROT  2008-04-25 14:48:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 23:17:24 CDT 2008.