title: Query problem with lookup column in SharePoint
body: <p>Setup:</p>
  
  <p>I have two lists on a SharePoint site, A and B.  List A has a column 'b' that is a lookup to the ID field of list B.  I have 500k+ records in A and about 6k records in B.  </p>
  
  <p>What works:</p>
  
  <p>I am able to execute a query for items in list A using SharePoint web services, and am even able to filter the query based on a specific "lookup" value for column 'b'.  For example, I can query for items in A whose column b matches 1234 (...&lt;Value Type="Lookup"&gt;1234&lt;/Value&gt;...), and so on.</p>
  
  <p>What doesn't work:</p>
  
  <p>The query does not work for items older than a specific date, even though my query does not involve dates in any way -- only the lookup column.  Any query on data newer than two years old works fine, anything older than that fails.  If I view items from the SharePoint web page they appear ok, and all the links from child records in B to parent records in A work just fine -- the lookup columns appear intact.</p>
  
  <p>Question:</p>
  
  <p>Is there some kind of maintenance task in SharePoint that can cause some underlying data to get corrupted that can prevent a query based on a lookup id to stop working, like a system restore, etc?  In other words, the lookup column data appears correct on the surface in the web browser.  But does SharePoint represent this value with a GUID or other invisible data that might be out of sync or stale?</p>
  
  <p>Thanks. </p>