title: How to use `OR` condition in sql statement?
body: <p>I want to use 'OR' condition in following sql statement please help me to do so.</p>
  
  <pre><code>   SELECT DATE, SecurityId
      FROM StateStreet
      INNER JOIN Securities ON StateStreet.SecurityID = Securities.securityid
      AND (     (SecurityName LIKE '% R V %'
                 AND Quantity &lt; 0
                 AND PortfolioId =@portfolioID)
             OR (SecurityName NOT LIKE '% R V %'
                 AND Quantity &gt; 0
                 AND PortfolioId=@PortfolioID)
             OR (Value = Quantity
                 AND Securities.PortfolioId =@PortfolioID) 
           )
     WHERE CONVERT(DATETIME,PeriodEndDate) = @PositionDate 
  </code></pre>
  
  <p>Please help me to use OR condition in above statement, I need to check 3 statements in OR condition. </p>