Use Notebook feature to produce professional data report and ...impress your boss

Hello friends, 

Welcome back to this new post.

 

I was thinking. The same job is now done in a different way. I can wear more casual attire, but surely not seeing students' faces live during classes makes it less easy to teach them.
If, on the other hand, I have to concentrate, I prefer to be alone in my studio and carve out moments in which to share work with my team.
Rember, it is important to communicate. It's important to team up!
This is the summary of concept of smartworking as I understand it.
But it does not matter, because everything advances and often there is no choice.

As usually enjoy the reading! 

 

 

Impress your boss with a professional report 


Let me tell you, Scripts done with the SQL Server Management Studio are old!
I am sure you have thousands SQL Server Scripts and it is not easy to keep in order all that materials.

For these reason today we talk about the notebook feature of which we already talked about here How to upgrade the SQL Server Management studio. SSMS 18.5 news. Moreover.. Notebook and the SQL assessment API

Breafly starting from the version 18.5 of the SSMS the free microsoft tool Azure Data Studio is installed.


Now if you start the Azure Data Studio, Notebook are the way to script SQL commands.

 



With a notebook you have at your disposal two types of block: Code or Text.
 
Let's see how to use them with a simple example!

Suppose you are the DBA and your boss asks you the 10 customers who bought the most valuable merchandise.
Immediately you would write your query in the management studio and print the grid with the results. 
 


After a few months you will be asked for some other information, for example, the best-selling products in the year.
 
Surely you should find the script you already wrote months before to integrate it.
You find it, integrate it, print the new grid and so on.
Or you can't find it and make a new script. 
 



Let's see how to get a better result with notebooks


Add a text cell and describe the request 
 

Here you are free to enter text as in word
 

 Then add a code cell
Enter your first SQL Command:
 
Press F5 or the symbol below et voilà..




 
 
 
Now add, in the same way, the second request your boss made to you and finally you will obtain:
 

 
WOW!!! 
 
I think it looks very professional


Note that:

  • For viewing use only the select commands windows are closed! 
  • Simply click a button you can export data from grids to CSV or Ecxcel
  • Simply press the graph button you will have your data plotted




Thant's all for now!

I hope you enjoyed this post and i have convinced you to use notebooks!

If so please show it to your friends and/or colleagues.

Luca













Previous post:COALESCE and IIF functions, the CASE statement and a secret at the end of the post

 


Comments

I Post più popolari

SQL Server, execution plan and the lazy spool (clearly explained)

SQL Server, datetime vs. datetime2

La clausola NOLOCK. Approfondiamo e facciamo chiarezza!