New York City .NET
The Recursive CTE
(Yet another boring org chart example – except this one has multiple roots)
One of my apps has a hierarchial org chart in its database. We don’t use the hierarchyid data type for this table. Instead, each row in the table just has a unique org ID and… Read more
4 comments, 563 reads
Posted in New York City .NET on 18 May 2011
How to determine the current SSIS runtime environment
If you want to test if you’re currently debugging an SSIS package via BIDS/Visual Studio, or running normally via DTExec, you can use the following utility functions inside a Script task.
Public Function SSIS_IsBIDS() As Boolean
Return (SSIS_Environment() = "DtsDebugHost")
End Function
Public Function SSIS_IsDTExec()… Read more
1 comments, 526 reads
Posted in New York City .NET on 28 April 2011
Renumbering Rows in a Table Variable (or Table/Temp Table)
I was recently working on a data cleanup problem where I had to do lots of comparisons of one row to the next row and I was trying to do my best to avoid using cursor for this. I was using the old trick of having an IDENTITY() field and… Read more
4 comments, 1,050 reads
Posted in New York City .NET on 18 February 2011
Creating a deep hierarchy with FOR XML
I have two tables in an application that I support. One is called [Report], and the other is [ReportParameter].
--SAMPLE DATA
DECLARE @Report TABLE (
ReportID INT PRIMARY KEY,
Title VARCHAR(30),
TitleHelp VARCHAR(100),
ReportName VARCHAR Read more
2 comments, 981 reads
Posted in New York City .NET on 27 January 2011
Using the MERGE statement
1 comments, 905 reads
Posted in New York City .NET on 17 January 2011
Wiring up a common click event handler in an ASP.NET page
0 comments, 766 reads
Posted in New York City .NET on 30 December 2010
How to tell if a property exists by name
0 comments, 245 reads
Posted in New York City .NET on 29 December 2010



Subscribe to this blog