Select Indistinct

Expeditions in Computer Automation - PowerShell, SQL Server, and more.

Author

ck

Converting TIMESTAMP to VARCHAR in TSQL or Replacing fn_varbintohexstr

Just a quick one in case I forget – I had a scenario where I needed to replace fn_varbintohexstr in converting an existing product to something more Azure SQL DB friendly. I did some googling and didn’t like the results,… Continue Reading →

Dynamic UNPIVOT Reporting on Cardinality.

Today I was diving into some extremely wide tables, I wanted to take a quick look at things like “How many unique values does this table have in every column?”. This can be super useful if you have a spreadsheet… Continue Reading →

Postgres Plugin Support Added in Azure Data Studio!!

I know I have been writing a lot about ADS recently, but this is even bigger than the Notebook announcement. A Postgres plugin has been announced in the insider release of ADS, and it just works! If the term Postgres… Continue Reading →

Update: T-SQL Notebooks in Azure Data Studio

It’s only been ten days since my first post about ADS Notebooks, and the team has already pushed out some super useful updates. Now launching an Azure Data Studio Notebook now is almost instantaneous. You are not prompted to install… Continue Reading →

T-SQL Notebooks in Azure Data Studio

Update: This blog post is already out of date due to the hard work of the ADS team! Check my Azure Data Studio Notebook Update for more details of why you can skip my warnings about your internet connection. I… Continue Reading →

Removing non-numeric characters from a SQL Server field without UDFs or Regex

A great question came up in the SQL Community Slack today: I saw this as a great modification on my earlier post, and wanted to show another way to implement the same solution. Walking through the steps: First, use sys.objects… Continue Reading →

Short and Sweet – Implementing simple character masking without UDFs

I’ve been on a bit of a hiatus with the move to California and figuring out my new life here. I needed some inline TSQL to mask a string based on a simple masking input, like ‘##xx##’ where # would… Continue Reading →

How long did that last PowerShell command take?

Today Thomas Rayner’s post on Get-History reminded me of a one liner I use to calculate time spent on the last command.

  You can select any property from the output and get just the TotalSeconds, but I like… Continue Reading →

Would you be involved with PASS without a SQL Saturday?

I wanted to bring you a quote from #SQLSaturday channel in the SQL Community Slack that I found amazing: “They [the PASS board] are already signaling they don’t want to spend $$ on SQL Sat and a few of the board members would… Continue Reading →

Slack Asks: Scripting out all objects from a SQL Server database with PowerShell and dbatools

@brianszadek says: I am looking to automate the scripting of objects with PowerShell for easier source control integration. I thought this would be a little bit easier, but it looks like the SMO way of doing this is still fairly… Continue Reading →

© 2019 Select Indistinct — Powered by WordPress

Theme by Anders NorenUp ↑