If you have been working with PowerShell and SQL Server for a while now, you know that it is not difficult to capture the PRINT statement output as VERBOSE output (which can then be redirected to a variable or file). You also know that it is not too difficult to run SQL in parallel against … Continue reading PowerShell & SQL Server: Run In Parallel – Collect SQL Results With PRINT Output From Across Your SQL Farm – Fast!
Note: The post is the same as the previous one for Oracle but this is for SQL Server. Although the date arithmetic gets a little complicated by the SQL Server syntax, the concept is the same. If you search the web on how to calculate the number of business days between two dates in SQL … Continue reading SQL Server – Calculating Business Days Between Two Dates (With Holiday Exclusion)
If you search the web on how to calculate the number of business days between two dates in Oracle, you would see so many results. Here is one more with some explanation to go with it. There is no magic to it. It is simple and straight-forward and this is as basic as it can … Continue reading Oracle – Calculating Business Days Between Two Dates (With Holiday Exclusion)
Oracle “Interval” data type is a new data type that was introduced in version 9i. In simple, terms, prior to 9i, if one needed to find the “duration” between a start time and end time, the query syntax was not too awkward but results were not human friendly. Without INTERVAL's help In the example below, … Continue reading Oracle’s INTERVAL Datatype Basics & Usage Examples
Update (Jan 18, 2017): I was able to add “autonomous transaction” type support to the logger using the means available in SQL Server (a loopback linked server). The new and updated code is available on GitHub. https://github.com/SQLJana/TSQL_Logger ....main post continues below Logging is one of those things no two people can agree on one way … Continue reading SQL Server – TSQL Code Logging To Table