Re: problems with single quotes..

Поиск
Список
Период
Сортировка
От postgresql
Тема Re: problems with single quotes..
Дата
Msg-id 200112022135.fB2LZem43627@postgresql.org
обсуждение исходный текст
Ответ на problems with single quotes..  ("Megalex" <megalex@klanomega.com>)
Список pgsql-sql
> Insert Into table(userID,FirstName,LastName) values(1,'''\''','test')
I don't know if you have been able to figure out yet what you need but think of it 
this way:   'Nick'    is a quoted word. let's form the possesive (nick's)   'Nick\'s'  notice you still have the
outsidequotes. The slash is telling the system 
 
to ignore the single quote that directly follows it.

so what you want is:
INSERT INTO table (userID, FirstName, LastName) VALUES (1, 'william', 'L\'sale')
if you intend to have a single quote in the middle of a string (L'sale)

Ted

-----Original Message-----
From: "Megalex" <megalex@klanomega.com>
To: <pgsql-sql@postgresql.org>
Date: Thu, 4 Jan 2001 12:57:19 -0600
Subject: [SQL] problems with single quotes..

> ok.. here is my deal..
> 
> everytime i try to run an insert and my text contains '\'
> it fails..
> 
> an sql example would be.
> 
> Insert Into table(userID,FirstName,LastName) values(1,'''\''','test')
> and i get this message...
> 
> Error while executing the query; ERROR: parser: parse error at or near
> "test"
> 
> how can i fix this??
> 
> Alex,




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

Предыдущее
От: "Anthony Bouvier"
Дата:
Сообщение: Re: Unexpected Return from Function
Следующее
От: Roberto Mello
Дата:
Сообщение: Re: problems with single quotes..