title: SQL WHERE clause only returning one of the results when there is 2 expected results
body: <p>I have a Where clause in Stored Procedure that only returns one of 2 possible returns in a where clause </p>
  
  <pre><code>GO
  /****** Object:  StoredProcedure [dbo].[RPT_HC_ShiftRates]    Script Date: 01/23/2018 10:51:55 ******/
  SET ANSI_NULLS ON
  GO
  SET QUOTED_IDENTIFIER ON
  GO
  ALTER Procedure  [dbo].[RPT_HC_ShiftRates]
  
  AS --variables
  BEGIN
  select c.Company
  , c.OurReference
  , Shifts1 as [Split shifts]
  , Shifts2 as [Invoiced at one rate]
  , s.PortalApproval
  , s.Rates
  , s.Breaks
  , c.ClientID
  
  
  from ClientSectorDefinedColumns s
  join clients c on c.ClientID = s.ClientID
  left OUTER JOIN ClientBranches AS CB ON C.ClientID = CB.BranchClientId
  
  where (Shifts1 = 'y' or Shifts2 = 'y' or s.Rates is not null or s.Breaks is not null)
  and (c.OurReference like 'P00%' or c.OurReference = 'HEA%')  
  and C.ClientID in (select objectid from SectorObjects where SectorId in (58, 59, 60, 61, 62, 63, 64, 65, 66, 47 ))
  
  END
  </code></pre>
  
  <p>The line I suspect is causing the issue is : </p>
  
  <pre><code>and (c.OurReference like 'P00%' or c.OurReference = 'HEA%')
  </code></pre>
  
  <p>This is only returning LIKE 'P00%' whereas it should be returning one or another. </p>
  
  <p>I am new to SQL and only completed 20761B with little luck finding an answer in my training material. </p>
  
  <p>Thanks for any assistance! </p>