Subject Re: Querying for words with special characters
Author ion2w
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 01:10 PM 14/03/2006, you wrote:
>
> > > Use an extra ' as an escape character
> > >
> > > select *
> > > from employee
> > > where firstname = 'Alice''s';
> > >
> > > (That is two apostrophies not a double quote character)
> > >
> > > Adam
> > >
> >
> >I tried the two apostrophes, but didn't get any records.
> >
> >My data looks like this: Alice's
> >My SQL looks like this: SELECT * FROM CONTACTS WHERE COMPANY =
'Alice''s'
>
> use CONTAINING or STARTING WITH:
>
> SELECT * FROM CONTACTS WHERE COMPANY CONTAINING 'Alice''s'
> SELECT * FROM CONTACTS WHERE COMPANY STARTING WITH 'Alice''s'
>
> ./hb
>

Thanks! I didn't know about CONTAINING or STARTING WITH. They'll be
very useful!