Often, I find the need for a specific format for a date. SQL has lots of great options with its convert function. Here's a handy chart. select convert(varchar, getdate(), 101) -- 12/23/2015 select convert(varchar, getdate(), 102) -- 2015.12.23 select convert(varchar, getdate(), 103) -- 23/12/2015 select convert(varchar, getdate(), 104) -- 23.12.2015 select convert(varchar, getdate(), 105) -- 23-12-2015 select [...]
A more in-depth version of this post can be found here. This article assumes that you have the following: An active Azure subscription. An Azure PowerShell installation. (This differs from the normal PowerShell installation.) Let’s get started. From the Azure Powershell command prompt, type: Add-AzureAccount Sign in to Azure. To get your SubscriptionName, simply execute [...]
The syntax for updating using correlated subqueries can be a little confusing at times. The example shown below uses a table variable as its target. The key is to include an aliased version of the table in the UPDATE's FROM clause. Once that is aliased, you can simply reference the alias in the subquery. For example: [...]
A medium-depth look at spinning up VMs via Azure PowerShell with a couple of extras to help make your PowerShell tasks easy.