SQL: Adding Business Days like DATEADD
Here is a SQL UDF that returns a date a number of BUSINESS days from a given date. It works like DATEADD but using the business week.
Here is a SQL UDF that returns a date a number of BUSINESS days from a given date. It works like DATEADD but using the business week.
There is an easy way to remove duplicate rows from a SQL Server 2008 table, by using an undocumented feature called %%physloc%%. This pseudo column shows the physical location of a row. Please keep in mind that this is an undocumented feature and unsupported…. Â Â Use at your own risk! DELETE FROM dbo.mytable WHERE dbo.mytable.%%physloc%% …
When I first found out about functions in SQL Server, I thought it would be a silver bullet to modularize my code. In the end, I realized a strategy was necessary to prevent performance degradation. One helpful approach is to use temp tables.
