Re: Problems with Quotes

Поиск
Список
Период
Сортировка
От Kieran Ashley
Тема Re: Problems with Quotes
Дата
Msg-id 6665151E3647D711B27B0090277C004F9AF721@ntexch02s.scs.dra.hmg.gb
обсуждение исходный текст
Ответ на Problems with Quotes  (Kieran Ashley <krashley@space.qinetiq.com>)
Ответы Re: Problems with Quotes  (Edmund Bacon <ebacon@onesystem.com>)
Список pgsql-sql
I tried that.  It starts spitting out the rest of the script to STDIN until it gets to the next " (which is being used
toquote a table name about 100 lines further on" at which point it throws an error, and dies.
 

It seems it really wants me to escape it somehow, but neither '\"' or ''"' seems to work.


-----Original Message-----
From: John DeSoi [mailto:desoi@pgedit.com] 
Sent: 12 January 2005 18:18
To: Kieran Ashley
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Problems with Quotes


On Jan 12, 2005, at 1:08 PM, Kieran Ashley wrote:

> I've tried using the replace() function to get rid of the ", but I 
> can't figure out how to use it without throwing an error.  I tried
>
> replace(col_name, '\"', '')
>
> and several other permutations but to no avail, do I need to use 
> something like an ASCII character code in order to get rid of a quote? 
>  If so which one, and if not, is there a better solution?
>


Try '"' as in

select replace('this "is" it', '"', '');  replace
------------ this is it
(1 row)


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

#############################################################

The information contained in this email and any subsequent
correspondence is private and is intended solely for the 
intended recipient(s). For those other than the intended
recipient(s) any disclosure, copying, distribution, or any 
action taken or omitted to be taken in reliance on such 
information is prohibited and may be unlawful.

#############################################################


В списке pgsql-sql по дате отправления:

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: Problems with Quotes
Следующее
От: Kaloyan Iliev Iliev
Дата:
Сообщение: Re: Problems with HAVING