Re: & in the where clause

From: Steve Kass (skass_at_drew.edu)
Date: 10/23/04


Date: Sat, 23 Oct 2004 00:36:47 -0400

pubs.dbo.discounts has a row where discounttype = 'Initial Customer' If
you want the row because it contains Initial and Customer, then you can
try something like

select ...
from discounts
where discounttype like '%Initial%' and discounttype like '%Customer'

I'm not sure what the point of the string 'Initial & Customer' is.

SK

JIM.H. wrote:

>Hello,
>
>SELECT discounts.*, discounttype AS Expr1
>FROM discounts
>WHERE (discounttype = 'Initial & Customer')
>
>This query in pub database does not bring anything because of ‘&’ in where
>clause. How can I get this working without removing & in the table?
>Thanks,
>Jim.
>
>
>
>