Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Daily Coping Tip

Take a different route when you next go somewhere

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

A Beginning Project

One of the ways in which developers become better at their craft is by building software. They tackle a personal project or maybe modify someone else's code. They may work through exercises, solving problems like the Advent of Code. As with many tasks, practice makes perfect.

Database developers need to do the same thing. To grow their skills, they certainly need to find ways to improve their skills. That means tackling some sort of database project, which is often inherently more complex than a software project. Beginning code projects might ask you to reverse a string. Certainly a T-SQL project might do that, but what about storing a set of data for strings? There can be a lot more to database development than the programming code.

I do think that learning to model data, and store it in an efficient, useful fashion, is a skill. Whether in a relational database or a NoSQL store of some flavor, you need to find a way to not only solve a problem, but get feedback.

Today I wonder if you have a thought on a good beginner project? I found a list, but are there any that you think will help a junior database developer learn how to built entities and relationships?

Maybe more importantly, how do you evaluate a good design? How do you get feedback, or test and evaluate your work? Often many of us make choices in the real wold, and we may not learn how well they actually work until lots of code is written and an application stresses our design.

If you've got ideas, exercises, or even ways to share designs, let me know today.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents

Import flat files to SQL Server on Linux using Azure Data Studio

carlos10robles from SQLServerCentral.com

Have you ever wonder how to import flat files to SQL Server on Linux? In this article, I will share my experience loading data to a Linux SQL Server instance using the new Azure Data Studio data import extension from macOS.

Automating SQL Compare Snapshots using SQL Snapper

Additional Articles from Redgate

If you have SQL Compare, then the SQL Snapper utility is very valuable 'extra' for certain team activities, because it can be freely distributed. It means that any developer can create a SQL Compare snapshot from databases that are on their local workstation and store them on the network.

Power BI Merge Queries and Append Queries

Additional Articles from MSSQLTips.com

In this tip we will cover how to use merge and append in Power BI to add additional data to a dataset that can then be used in reports and visuals

From the SQL Server Central Blogs - “They need help, we must help.” #forGarethSwan

Kenneth.Fisher from SQLStudies

We just finished a memorial for Gareth Swanepoel. He was an amazing person and someone I wish I’d gotten to ... Continue reading

From the SQL Server Central Blogs - RIP Gareth Swanepoel and GoFundMe

Steve Jones - SSC Editor from The Voice of the DBA

Last week we lost another SQLFamily member. Gareth Swanepoel passed away on 8 Jan 2021. He was a fellow speaker, jolly fellow, and Microsoft PM. Across many years of...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Amend a Commit

I am working on some code and run this:
git commit -m "tset added for the new user case in #342"
I realize I have a typo in my message. What can I do?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

What hasn't changed?

I've got two ways to aggregate sales in a table. I see this code in a report:

select NULLIF(SUM(saletotal), SUM(s.salefinaltotal)) as Comparison
from dbo.SaleHeader

What value should I get from this function if the two aggregates are equal?

Answer: Always NULL

Explanation: If the two values are equal, NULL is returned. Ref: NULLIF - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/nullif-transact-sql?view=sql-server-ver15

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Administration
Help on turning query - hi there: we are using sql2017 std version.  Query plan attached here. I found that sort operator was having the biggest operator cost. Any suggestion to tune this query?  I am starting to work on tuning.. please forgive some naïve questions I may post from time to time. Thanks Hui
Exchange Event in SQL Profiler - Hi all. I received a Deadlock Graph and saw that I have Exchange Event in it. I read that it means the problem with parallelism. I have such a query: SELECT * FROM TABLE Account WHERE ID NOT INT (SELECT * FROM TABLE Account WHERE ...) Could this be the reason in the subqueries and […]
Performance - I am assisting with a migration. doing a V to V migration from a legacy environment to the hosted infrastructure. I want to do some baseline testing and wondered if there are some scripts i could run in SQL that i could run on the legacy and on the new environment to compare so I […]
SQL Server 2017 - Development
xp_cmdshell - System Cannot Find the Path Specified - Dear Group: This is my first attempt at using the xp_cmdshell command, but right now, I am trying to run it inside SSMS.  We need to create a procedure to unzip files so that we can import the data into our tables.  I am trying to use PKWare SecureZip to do this, as I have […]
SQL Server 2016 - Administration
High CPU and plan cache instability - In the past couple of months my SQL Server instance has been experiencing higher than usual CPU usage than before, at times hitting 100% and affecting an application. There have been no recent changes to any SQL Server configurations or options in that time, the OS may have in terms of Patching but that is […]
SQL Server 2016 - Development and T-SQL
Automated Deployment Scripts - I'm wondering what other people are using to create deployment scripts.  We have to create a script and deploy to 3rd party tool for deployment to each environment.  We use TFS/Jira, so any scripts that get created are associated to a Jira item as well as put in TFS.  The issue is, that when our […]
Table Elimination In a View - I'm experiencing a situation similar to the overly simplified example provided here CREATE TABLE dbo.Sales ( DateKey INT ,Quantity INT ) INSERT INTO dbo.Sales VALUES ( 20210101 ,5 ) ,( 20210102 ,15 ) ,( 20210103 ,4 ) ,( 20210104 ,8 ) ,( 20210105 ,23 ) ,( 20210106 ,47 ) ,( 20210107 ,31 ) ,( 20210108 […]
Import JSON in SSIS with Column Row Transformed - I’m attempting to modify the code on this SQL Server Central article "Approaches to Import JSON in SSIS (SQL Server 2016+) Part 2" using the methods described under “Using SQL Functionality”. I'm successfully using this with other JSON files formatted in a more standard way. However, the JSON flat file that I’m tasked with bringing […]
Update large table rows within a group - I have a large employee table with lots of columns and versions and one org lookup table also with some versions. I need to update a column org_id in employee table  which is all nulls now with no history. An employee can have multiple versions records each with same empid but same or different rc_code. […]
CAST(NULL AS varchar(1)) - Hello All, I have been tasked to improve a very old SQL code we have and first thing I see (may not necessarily be the candidate for performance improvement though) going through the code is many CASE records with CASE WHEN myColumn IS NULL THEN CAST(NULL AS varchar(1)) .... Can one advise why someone would […]
Development - SQL Server 2014
Tuning Complex Procedures - Hello, I was wondering if anyone has written something like this.  Basically I am trying to tune some stored procedures and I am looking for a stored procedure or tool that would allow me to run a problematic stored procedure a specified number of iterations and then aggregate results like CPU, Reads, Writes, Etc to […]
SQL Server 2019 - Administration
SSIS jobs - we are actually not using a file logger for our SSIS jobs, the logging is done to the database. File logging is in addition, I was thinking to log them on the same server instead of shared location. Do you see any issues?  
SQL Permissions - My understanding is you can't grant access to users with select, View database and view definitions etc. at instance level without any user databases created on it. Please advise?
SQL Server 2019 - Development
CONTAINS one of multiple values - Sorry for the NUBE question I need to build a select statement where a column contains one of many possible values I think I can create multiple lines like this but, I think there is a more efficient way to do it, especially because I have 30 variables   select * from COMPANY where contains […]
Analysis Services
SSAS Tabular SSDT DAX Drillthrough Issue - Hello, I've come across a scenario where the drillthrough functionality is not working when multiple dates from a fact table is joined to a single date dimension. If I have a fact table with multiple status dates e.g. Resolved Date, Logged Date and join it to one Date dimension table, one of the relationship would […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -