Posts

Estimated Execution Plan Temp Table

Image
Estimated Execution Plan on Temp Table Estimated Execution Plan with #TempTable Estimated Execution Plan MS SQL Server Recently I encountered a problem while trying to understand the performance issues with one of my stored procedures in SQL Server 2008. This specific stored procedure uses a #tempTable to store some data. It looks like this: Obviously I encountered "Invalid object name '#TempTable'." I saw some places online which suggested several things, but the best solution for this was the simplest. 1. Simply comment the "drop table #tempTable" you do at the end of the stored procedure. 2. Run the query (which will save the #tempTable). 3. Click on the Estimated Execution Plan button. Since you have data in your #tempTable, you can run it freely. p.s. Don't forget to drop this table when you're done. Hope it helped, Elad Shalom, CTO at ITweetLive.com

String.Contains Case Sensitive

String.Contains Case Sensitive Case Sensitive String.Contain String.Contains vs IndexOf .Net I encountered an issue with string contains couple of days ago... well, the fact is - it has no StringComparison for culture and Case Sensitivity. I found a better way to do this, and I just wanted to share in a short post:         string bookTitle = "The Old Man and the Sea";         if (bookTitle.IndexOf("the old man") > -1)         {             // this is case sensitive         }         if (bookTitle.IndexOf("the old man", StringComparison.OrdinalIgnoreCase) > -1)         {             // this is ignore case         } ...

Ajax For Dummies in Asp.Net

Ajax for Dummies with Asp.Net.  Ajax for Dummies with JQuery. .Net WebMethods Couple of weeks ago a friend of mine went to a job interview for a junior developer position.  After the interview he came back and complained about his Ajax skills. Well, Noam, this is for you: First open a new ASP.Net web application (or website, doesn't really matter). Make sure you have JQuery in your website. Create a new ASPX page.  lets call it, WebMethods.aspx At the top of the page add "using System.Web.Services;" Create a method called "AjaxForDummies()" and place a "[WebMethod]" attribute for it. This method will not accept parameters but will return a string to the server. Create another method called "AjaxForDummies2(string name, string sDate) " this method will accept 2 parameters and returns a string to the server. The JavaScript code is actually very simple: At the HTML part of the page place a simple code: Pay Attention: 1. ...