Re: LIKE MATCH USING & as a character
Date: 16 May 2002 01:44:58 -0700
Message-ID: <db479d88.0205160044.55ad598_at_posting.google.com>
june.bracken_at_volvo.com (JB) wrote in message news:<757cee95.0205130604.b17c1e0_at_posting.google.com>...
> I need help. I have looked everywhere for an example of how to do
> this correctly. I understand of how to use escaping to use the % or _
> as a character. What I have not found is how to use it on the
> ampersand character. Here is the example of I have.
>
> 1 select * from name
> 2* where name_text like 'MOM & POP%'
>
> It comes back with this message from oracle.
>
> SQL> /
> Enter value for pipe:
> old 2: where company_name like 'MOM & POP%'
> new 2: where company_name like 'MOM %'
>
> This returns all the MOM names instead of just the MOM & POP's. I
> need this for some search criteria. Is there anyway of making the
> ampersand a character?
>
> Much appreciated for your assistance.
>
> JB
June,
This is just a SQL*Plus thing...
set define off
will stop using & as a substitution variable prompt indicator. If you still need to use substitution variables, tru
set define ^ (or whatever)
which would use ^ in place of the &
Regards,
CE Received on Thu May 16 2002 - 10:44:58 CEST