escape character in a function - Mailing list pgsql-novice

From Patrick Hatcher
Subject escape character in a function
Date
Msg-id OF42F17F60.601FBF55-ON88256BA4.0074D9F1@fds.com
Whole thread Raw
List pgsql-novice
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



pgsql-novice by date:

Previous
From: Mark Thomas
Date:
Subject: INSERT results
Next
From: "Joshua b. Jore"
Date:
Subject: Re: INSERT results