title: Spooky query behavior : Same query, different results when inside a view
body: <p>The same query brings different results when inside a View.</p>
  
  <p>I tried to force same codepages, same data types, Common Query Expressions... none worked.</p>
  
  <p>Have a look at this simple query:</p>
  
  <pre><code>SELECT TOP 100 CompanyID, SubsidiaryID 
  FROM STAGING.SALESAX S
  INNER JOIN Subsidiary SU
  ON S.CompanyID = SU.SubsidiaryAXCode
  </code></pre>
  
  <p>It returns all expected 100 rows.</p>
  
  <p>If I use the <code>EXACT SAME QUERY</code> in a view:</p>
  
  <pre><code>CREATE VIEW [STAGING].[VSalesAXBASE]    
  AS    
  SELECT TOP 100 CompanyID, SubsidiaryID 
  FROM STAGING.SALESAX S
  INNER JOIN Subsidiary SU
  ON S.CompanyID = SU.SubsidiaryAXCode
  
  GO
  
  SELECT * FROM [STAGING].[VSalesAXBASE]
  </code></pre>
  
  <p>it returns 0 ROWS</p>
  
  <p><img src="https://i.stack.imgur.com/YBNhI.gif" alt="screenshots of me running the query in two ways"></p>
  
  <p><img src="https://i.stack.imgur.com/ssAom.gif" alt="Screenshot of query updated without TOP Statement"></p>