2

http://data.stackexchange.com/stackoverflow/q/92981/

It does not seem to care what the filter is

where v.VoteTypeId = 999 -- question accepted by asker

All v.VoteTypeId still show in the result

4

It's just that the rows found are all matching this part of the WHERE clause:

and p1.id = 4788735 or p1.parentid = 4788735​​

If you comment that out:

where v.VoteTypeId = 999
-- and p1.id = 4788735 or p1.parentid = 4788735​​

you'll see you get nothing that matches just v.VoteTypeId = 999.

Perhaps you intended:

where v.VoteTypeId = 999
and   ( p1.id = 4788735 or p1.parentid = 4788735​​ )

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .