Dynamic is one of my favorite search words. It is the opposite of “static”. A lot of time, SQL statements requires static input, such as column name and table name in SELECT. However, Dynamic SQL gives a way to overcome this requirement. This post I will share with you other two usages of ‘dynamic’.

Fun Picture

First, pivot is a good statement of T-SQL. I want to use it in one of my queries. But, normally, you have to write the pivot columns ‘statically’. But, it only make sense for me if the query can change the pivot columns accordingly. So, I search ‘dynamic pivot SQL Server’. I got this very good post explains in great detail about how to solve my problem.

https://www.essentialsql.com/create-dynamic-pivot-table-sql-serve

Recently, I started to pick up more details of Power BI. This page shows the ‘dynamic’ change of of page title of a Power BI report.

https://www.blue-granite.com/blog/create-a-dynamic-title-in-power-bi

Next time, I will show you another of my word: parameter.


<
Previous Post
Running Total Percentage
>
Next Post
Trick SQL Server to use the best Execution Plan