How does one query for %?

How does one query for %?

am 14.08.2007 08:09:18 von SafeEarthSafeChild

In TransactSQL % is the wildcard
SELECT *
FROM Table
WHERE Table.Field LIKE '%Example%'

But how do I find "% solids" or just "%"?

--
Jennifer Gibbons
Hold your dreams close to your heart, give them wings, and let them fly.
http://safeearthsafechild.fourpointmoms.com

Re: How does one query for %?

am 14.08.2007 08:35:35 von Jack Jackson

On Tue, 14 Aug 2007 06:09:18 GMT, "SafeEarthSafeChild"
wrote:

>In TransactSQL % is the wildcard
>SELECT *
>FROM Table
>WHERE Table.Field LIKE '%Example%'
>
>But how do I find "% solids" or just "%"?

The SqlServer TransactSQL Help says there are two ways to do this.
1. Enclose the % in square brackets.
2. Use the ESCAPE clause to specify a character that makes the next
character be treated as an ordinary character:
match_expression [ NOT ] LIKE pattern [ ESCAPE escape_character ]