﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Reporting Services / Reporting Services 2008 Development  / query with OR in where clause / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 12:57:50 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: query with OR in where clause</title><link>http://www.sqlservercentral.com/Forums/Topic988702-1633-1.aspx</link><description>stored procedures is an alternative...but i am concerned why query is doing this on its own..even when i write is corretly and save...its saving its own way.</description><pubDate>Tue, 21 Sep 2010 00:30:08 GMT</pubDate><dc:creator>masqazi</dc:creator></item><item><title>RE: query with OR in where clause</title><link>http://www.sqlservercentral.com/Forums/Topic988702-1633-1.aspx</link><description>What about making it into a stored procedure and then making the call to that? That would absolutely fix the issue.</description><pubDate>Mon, 20 Sep 2010 09:09:00 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>query with OR in where clause</title><link>http://www.sqlservercentral.com/Forums/Topic988702-1633-1.aspx</link><description>i have a query select  name, name2, type, date, status from table1where  (name = '' or name &amp;lt;&amp;gt;name2) and status =0but, ssrs is converting this query automatically to select  name, name2, type, date, status from table1where  name = '' and status =0 or name &amp;lt;&amp;gt;name2 and status =0this is giving wrong results... the reason is brackets are missing in operands..the correct way could beselect  name, name2, type, date, status from table1where  (name = '' and status =0 ) or (name &amp;lt;&amp;gt;name2 and status =0)how to solve this ??</description><pubDate>Sat, 18 Sep 2010 02:15:55 GMT</pubDate><dc:creator>masqazi</dc:creator></item></channel></rss>