Wednesday, March 12, 2008
 Monday, July 02, 2007

SQL Server Interesting Links

Interesting piece on SQL server Myths- Jason Haley

talk abt SQL server myths on truncate commands, where a sql table variable is stored, etc

SQL server error handling, and a must read

 


ASP.NET | SQL
7/2/2007 1:57:02 AM (GMT Daylight Time, UTC+01:00)  #  Comments [0] 

SQL - Parsing delimited string

Here is a cool function to parse delimited string input to SQL stored proc.[thru Jason Haley]


SQL
7/2/2007 12:53:48 AM (GMT Daylight Time, UTC+01:00)  #  Comments [0] 
 Sunday, November 26, 2006

GuidanceExplorer rocks

GuidanceExplorer is a great reference 

 


ASP.NET | SQL | XML
11/26/2006 6:55:52 AM (GMT Standard Time, UTC+00:00)  #  Comments [0] 
 Saturday, November 18, 2006

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Please visit Kris's blog for detalied explanantion.

The brief summary 

First you'll need to open up SQL Server Configuration Manager. Navigate to that in the menu like Microsoft SQL Server 2005 > Configuration tools > SQL Server Configuration Manager.

Double click, or right click and choose Properties, of the selected line and you'll get the properties window

You'll need to make sure that the Local system is selected.

The second part of the solution's to delete the following folder on your hard drive: c:\Documents and Settings\[user]\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS(1). This folder's used to store information and apparently it messes up the proper working of SQL Express.


ASP.NET | General | SQL
11/18/2006 8:19:19 PM (GMT Standard Time, UTC+00:00)  #  Comments [1] 
 Friday, October 27, 2006

ASP.Net Site Configuration, SQL 2005

one would assume that it is easy to use ASP.Net Site Configuration tool. i had to spend around 2 hrs to get this straight. I apparently had every problem you could encounter..

ASP.Net Site Configuration on a server

Steps to follow

Extablish mixed authentication mode


ASP.NET | General | SQL
10/27/2006 5:17:30 AM (GMT Daylight Time, UTC+01:00)  #  Comments [0] 
 Thursday, October 05, 2006

SQL: Return "identity" rowID after inserting data and naming stored procedures

Often times as a developer we all need to insert new records into a table in a database and also retrieve the identity id of the most recently added row. The most common solution to this situation is use @@Identity. Simple eh? No, because @@Identity returns the most recently created identity for your connection.  So if there is any other operation going on like a trigger, the identity created by the trigger would be returned instead of yours.

So it is better to use scope_identity() always.

Naming stored procedure with a prefix of sp_ is pretty common, i should say that is the current norm. But Apparently this is a bad habbit because the system databases are the only ones that should be named with prefix sp_.
Long story short, SQL server starts looking for any stored procedure with a prefix sp_ in the Master database.

For more on the above feature,  go here . Pretty cool dont's info on SQL practices


SQL
10/5/2006 5:01:33 AM (GMT Daylight Time, UTC+01:00)  #  Comments [0] 
 Sunday, August 20, 2006

SQL Coalesce - underutilized function

There are many days in the life of a programmer, when you need to build a search query based on the some/all fields of user input. This function would return the first non-null value.

Coalesce function could be a perfect fit in such cases. It could replace case statements, ISNULL etc.

The other beauty of Coalesce is it take multiple values, whereas ISNULL can take only two values to compare.

SELECT Name, COALESCE(HomePhone, Mobile, Pager) AS ContactNumber FROM User

would return the first non-null value or null value if all of the values are nullPlease follow here for much more on this.

Coalesce on SqlTeam

Interesting Facts on Coalesce

 


SQL
8/20/2006 6:15:19 AM (GMT Daylight Time, UTC+01:00)  #  Comments [1]