Search Postgresql Archives

Re: finding strings with quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christine Penner wrote:
> I'm trying to do a select to find on a char field that has a single 
> quote but getting errors. This is what I'm doing:
> 
> Select * from f_buildings where B_STRET_LNE_CON='BERLETT\'S ROAD'

There are a couple of ways to do this in PG but the easiest and closest
to the standard is to use two quotes to insert a quote into a string.

Like this:
   Select * from f_buildings where B_STRET_LNE_CON='BERLETT''S ROAD'

HTH

Bosco.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux