[GENERAL] Quoting/Escaping

1999-11-28 Thread Bill Sneed

I'd like to be able to find a book title that contain C++ in the
title

select * from books where title ~* 'C++'   doesn't work.

I've tried all the basic methods of quoting the Plus (+) signs but
none seem to work...

Any hints would be most appreciated

Thanks...

Bill Sneed, Prospect, Maine





Re: [GENERAL] Quoting/Escaping

1999-11-28 Thread Ed Loehr

Bill Sneed wrote:

 I'd like to be able to find a book title that contain C++ in the
 title

 select * from books where title ~* 'C++'   doesn't work.

 I've tried all the basic methods of quoting the Plus (+) signs but
 none seem to work...

 Any hints would be most appreciated

 Thanks...

 Bill Sneed, Prospect, Maine

 

I think the 'like' operator may do what you seek.

create table t (w varchar);
insert into t (w) values ('C++');
insert into t (w) values ('C');
select * from t where w like 'C++';
w
---
C++
(1 row)

Cheers.
Ed