Home All Groups Group Topic Archive Search About
Author
24 Apr 2007 5:46 AM
Ant
Hi,

Is this the correct thread for questions on SQL Profiler?

If not please direct me to the correct thread. Cheers!

My question is, when setting up the filter, how do you use Lke & Not Like?

eg. If I have two databases DB1 & DB2.

Do I filter it by Like DB1
or Not Like DB2.

Does Like exclude all not like?

Many thanks for any thoughts on this

Ant

Author
24 Apr 2007 1:24 PM
TheSQLGuru
Yes, like will exclude any non-matching entities.

--
TheSQLGuru
President
Indicium Resources, Inc.

Show quote
"Ant" <A**@discussions.microsoft.com> wrote in message
news:A2A9B877-36AB-430D-AAB8-53BFCD8D21D6@microsoft.com...
> Hi,
>
> Is this the correct thread for questions on SQL Profiler?
>
> If not please direct me to the correct thread. Cheers!
>
> My question is, when setting up the filter, how do you use Lke & Not Like?
>
> eg. If I have two databases DB1 & DB2.
>
> Do I filter it by Like DB1
> or Not Like DB2.
>
> Does Like exclude all not like?
>
> Many thanks for any thoughts on this
>
> Ant
Author
24 Apr 2007 10:39 PM
Erland Sommarskog
Ant (A**@discussions.microsoft.com) writes:
> Is this the correct thread for questions on SQL Profiler?
>
> If not please direct me to the correct thread. Cheers!
>
> My question is, when setting up the filter, how do you use Lke & Not Like?
>
> eg. If I have two databases DB1 & DB2.
>
> Do I filter it by Like DB1
> or Not Like DB2.
>
> Does Like exclude all not like?

The tricky thing is that when a column is not populated, the filter
does by default not exclude the row. In SQL 2000, there is no way around
it from Profiler. In SQL 2005 there is a checkbox for it.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button