Re: [SQL] Substitute

2007-03-20 Thread Michael Fuhr
On Tue, Mar 20, 2007 at 05:54:47PM -0600, Judith wrote: > somebody knows, how I can substitute in a query if a field contains a > character that I want to be shown with other character? > > for example if I have a \n I want to shows me a ~ in the result of the > select One way is with translate

Re: [SQL] Substitute

2007-03-20 Thread Milen A. Radev
Judith написа: > Hello everybody > > somebody knows, how I can substitute in a query if a field contains a > character that I want to be shown with other character? > > for example if I have a \n I want to shows me a ~ in the result of the > select > Look for 'replace' here - http://www.pos

[SQL] Substitute

2007-03-20 Thread Judith
Hello everybody somebody knows, how I can substitute in a query if a field contains a character that I want to be shown with other character? for example if I have a \n I want to shows me a ~ in the result of the select thanks in advanced!! ---(end of broadcast

Re: [SQL] Substitute a Character

2006-09-07 Thread Kaloyan Iliev
Hi, Try: UPDATE foe SET field = regexp_replace(field, '^.', '0'); OR UPDATE foe SET field = regexp_replace(field, 'A', '0'); This will replace in table "foe" in the column "field" 'A' with '0'; Regards, Kaloyan Iliev Judith wrote: Hello everybody!! I have a field type text with foli

Re: [SQL] Substitute a Character

2006-09-06 Thread Daryl Richter
On 9/6/06 12:53 PM, "Judith" <[EMAIL PROTECTED]> wrote: > Hello everybody!! > > I have a field type text with folios like this: A98526 > > but I want to change de A for a 0 like this: 098526, exists a way to > do this in a query??? select translate( 'A98526', 'A', '0' ); transla

Re: [SQL] Substitute a Character

2006-09-06 Thread Chris Mair
> Hello everybody!! > > I have a field type text with folios like this: A98526 > > but I want to change de A for a 0 like this: 098526, exists a way to > do this in a query??? > > Thanks in advanced!!! You should look at these functions: http://www.postgresql.org/docs/8.1

Re: [SQL] Substitute a Character

2006-09-06 Thread Andreas Kretschmer
Judith <[EMAIL PROTECTED]> schrieb: > Hello everybody!! I have a field type text with folios like this: > A98526 > > but I want to change de A for a 0 like this: 098526, exists a way to do > this in a query??? Perhaps something like this: test=# select regexp_replace('A98526', '

[SQL] Substitute a Character

2006-09-06 Thread Judith
Hello everybody!! I have a field type text with folios like this: A98526 but I want to change de A for a 0 like this: 098526, exists a way to do this in a query??? Thanks in advanced!!! ---(end of broadcast)--- TIP 6: explain