Skip site navigation (1) Skip section navigation (2)

Re: escape character in a function

From: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
To: 'Patrick Hatcher' <PHatcher(at)macys(dot)com>,pgsql-novice(at)postgresql(dot)org
Subject: Re: escape character in a function
Date: 2002-04-24 10:05:30
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E01F7485F@MAIL_EXCHANGE (view raw or flat)
Thread:
Lists: pgsql-novice
Try doubleing the apostraphe again, ie:
 set div_name = ''RICH''''S''
Cheers,
- Stuart

> -----Original Message-----
> From: Patrick Hatcher [mailto:PHatcher(at)macys(dot)com]
> Sent: 23 April 2002 22:26
> To: pgsql-novice(at)postgresql(dot)org
> Subject: [NOVICE] escape character in a function
> 
> 
> Howdy
> How do I do an escape character in a function to for a word 
> that has an
> apostrophe like: RICH'S.  I tried ''RICH\'S'', but when I run 
> my function,
> I get back mismatch parentheses.
> TIA
> 
> REATE FUNCTION "sp_updaterlg"() RETURNS "int4" AS '
> begin
>   update bcp_cust
>   set div_name = ''RICH\'S''
>    where
>    div_store is not null
>    and instr(div_store,''RICH\'S'',1) >0;
> 
>   return 1;
> end;
> ' LANGUAGE 'plpgsql';
> 
> Patrick Hatcher
> Macys.Com
> 
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

Responses

  • pg_setlocale() at 2002-04-24 14:46:32 from Torbj=?ISO-8859-1?B?9g==?=rn Andersson

pgsql-novice by date

Next:From: Torbj=?ISO-8859-1?B?9g==?=rn AnderssonDate: 2002-04-24 14:46:32
Subject: pg_setlocale()
Previous:From: Henshall, Stuart - WCPDate: 2002-04-24 10:03:18
Subject: Re: Storing .jpg files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group