Archive for the ‘SQL Server 2005’ Category
New to .NET integration in SQL Server? Here is some useful information put together for you: · .NET integration is one of the key feature in SQL Server 2005 · The CLR is hosted by SQL server thereby executing the stored procedures in SQL Server’s process space · CLR stored procedures uses ADO.NET objects (SqlCommand, SqlConnection, DataSet [...]
Filed under: SQL Server, SQL Server 2005 | Leave a Comment
Tags: CLR Stored Procedure Basics, CLR Stored Procedures, Introduction to CLR stored Procedures, SQL Server 2005 CLR Routines, SQL Server 2005 CLR support, SqlContext, SqlPipe, SqlPipe.Send()
We often need to deal with hierarchies (tree structures) in SQL. Some common examples are employee hierarchies, parent-child hierarchies etc. There is a clean solution to achieve it using CTE (Common Table Expressions) which is demonstrated below with a simple example. The diagram below represents a parent-child hierarchy: And the table [...]
Filed under: SQL Server, SQL Server 2005, T-SQL | Leave a Comment
Tags: Common Table Expressions, CTE, Recursive Query SQL, SQL Recursion
Using T-SQL PIVOT Clause
One feature in SQL Server 2005 that made my life easier many occasions is PIVOT clause in T-SQL. You will find it useful if you need to generate Cross-Tab summaries especially while generating reports. This feature allows you to convert a column’s values in table rows into columns. To see how it works, [...]
Filed under: SQL Server, SQL Server 2005, T-SQL | 3 Comments
Tags: PIVOT, SQL Server, SQL Server 2005, T-SQL
