Here's an update to my blog entry 3 years ago regarding the same topic: ---Calculates the first day of the previous month SELECT DATEADD (mm, DATEDIFF (m, 0, GETDATE ()) - 1, 0) AS [First day of the previous month ] ---Calculates the first day of current month SELECT DATEADD (mm, DATEDIFF (m, 0,...
In one of the website I have developed, we feature random products displayed on a webpart. This can be done several ways either of the code behind or via t-sql but I think the simplest way to do it is via t-sql with the help of Guid columns. Globally Unique Identifier or GUID is a randomly generated...
When you are developing software product to be catered to diverse customers, it must be a standard to localized your software. With .NET this has never been easy, on .NET 2.0 its even easier with striongly typed resource files. But localizing application must be part of the architectture and should not...
I’ve been trying to familiarize myself lately with SQL CLR and I cant help but notice the similarity it has with MS Access and its VBA user-defined functions. Being a DBA working on both SQL Server and MS Access databases, Im quite fond of placing my business rules in the databases. With SQL Server,...