Get Your Own Blog
If you would like to blog on SQLServerCentral.com then send an email to
Contact the author
for this blog
The author of the NYCdotNet blog is a VB.NET and SQL server developer living and working in New York City. The author seeks to promote clean, readable, efficient code in both VB and SQL from design to development, deployment, and application maintenance.
(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
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")
Public Function SSIS_IsDTExec()… Read more
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
I have two tables in an application that I support. One is called [Report], and the other is [ReportParameter].
DECLARE @Report TABLE (
ReportID INT PRIMARY KEY,
ReportName VARCHAR Read more
I love MERGE. You know all those awful IF BEGIN END ELSE BEGIN END blocks you need to write for SQL Server? A well-written MERGE statement can eliminate a lot of them! Let's do a quick intro.
--Prepare test tables.
DECLARE @MyProducts TABLE (
I was just refactoring a server-side control and ran into some horrible code. Basicaly there was a big listbox that was supposed to hold people's names with letters A through Z to the left which were ASP.NET LinkButtons. lnkBtnA, lnkBtnB, etc. Each link button had its own click handler whose…
I recently was working on a library to manage reports in an application (probably a good candidate for an open source project) and needed to be able to grab the value of a property on an object by name without knowing if that property existed or not. Of course .NET reflection comes…