title: SQl Server still getting the error of "Timeout expired. The timeout period elapsed"
body: <p>I thought I had a sql error licked in a post <a href="https://stackoverflow.com/questions/8885072/sql-server-i-need-to-fix-the-error-of-timeout-expired-the-timeout-period-elaps">here</a> just a bit ago... (Error message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.") I'm trying to run this with the database tools in visual studio... not management studio, and not via client code/ ADO (yet). I rewrote a fairly simple query that uses a couple of custom functions... the functions as well as the parts of the query have been tested and all are running well, but the query below times out.. this does run exactly as typed in Management Studio, and takes about 4 minutes. As I mentioned in my other post, I changed the setting under Tools>Options>Designers>"Override connection string time- out value" to 120 seconds as per this posting, but... it still times out after 30 seconds. Adding the ISNULL in this latest version is the change that has it running in management studio.</p>
  
  <pre><code>SELECT Symbol, LatestDate
  FROM (SELECT Symbol, ISNULL(dbo.LatestDateInDailyPricingVolBySymbol(Symbol), '1/1/1900') AS LatestDate FROM tblSymbolsMain) AS T2
  WHERE (LatestDate &lt; dbo.RecentTradingDateByNumber(3))
  </code></pre>
  
  <p>The general idea is to get back a subset of stock symbols that don't have a corresponding data point in my daily pricing table for at least 3 days. Any takers? Thanks all.</p>