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

Daily Coping Tip

Write down hopes or plans for the future

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.

Tough Interview Questions

Many of us know that interviewing someone and evaluating their skills is a tough job. There have been all sorts of techniques tried by various companies, some of which require creativity, but many are related to technology.

I've seen a lot of senior technology people lament the quality of the candidates they interview. I suspect some of this is that most of the really talented people aren't out there interviewing regularly. Instead, there are many people applying for jobs, some beyond their skills, hoping to get through an interview and get an offer.

I ran across an article that listed a number of SQL Server interview questions, most of which are aimed at experienced developers. It's not a long list, but it does cover some topics that aren't necessarily things that you use often in SQL Server. While I have written an INSTEAD OF trigger, I haven't often and might not give a great answer for someone that is looking for deep knowledge.

Perhaps that's the intent, however, to see if an experienced person has touched a lot of different features in SQL Server. Maybe this is a breadth more than a depth list? I'm curious if you think that is the case. Maybe you have an opinion you'd like to share on these, or other questions, which might help you determine the experience of a candidate.

Finding a great candidate for your organization is hard. It doesn't matter if you are looking for junior people that can grow, or senior ones to lead. Often interviews result in an impression that is a bit of a coin flip. After a year you may or may not have been right.

Steve Jones - SSC Editor

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

 
  Featured Contents

Guide to Quickly Creating an Azure Data Lake Storage

Ashish Mahajan from SQLServerCentral.com

Read a step by step guide to setting up an Azure Data Lake Storage account.

Create Azure DevOps Analytics Visuals with Power BI OData Queries

Additional Articles from MSSQLTips.com

This article focuses on the use of OData Queries to integrate DevOps Analytics data to Power BI.

Gitflow Workflow Hotfix Branching for SQL Database Projects

Additional Articles from SQLServerCentral

Git is a great tool for source control and in this tip we look at how you can utilize Git source control to build and deploy database hotfixes.

From the SQL Server Central Blogs - Synapse Analytics and .NET for Apache Spark Example 4 - JOINS

Ed Elliott from Ed Elliott's Sql Developer Blog

This is a bit of a longer one, a look at how to do all the different joins and the exciting thing for MSSQL developers is that we get...

From the SQL Server Central Blogs - Azure Platform Series: cloudshell code -your (brilliant) online editor

HamishWatson from The Hybrid DBA's Blog

This post is about code which is an online editor you can use with cloudshell. I live in the Azure platform all day (almost) every day. What this means...

 

  Question of the Day

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

 

Get rid of the changes

I am working on some database code stored in git. I am create a new branch and start making some changes. I realize, however, that I've made mistakes in my assumptions. I want to abandon my changes to a couple files and go back to the beginning of the last commit. How do I easily do this?

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)

Lockdown Minutes

I have code that represents when my area went into pandemic lockdown:

DECLARE @builddate DATETIME = '2020/03/11 20:00';

How can I get the number of minutes since that time?

Answer: SELECT DATEDIFF(n, @builddate, GETDATE())

Explanation: You can use "mi" or "minute" for the parameter in DateDiff. Ref: Datefiff - https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-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
PLE is low most of time! - My prod server (physical) has Total physical memory around 375GB and "max memory" setup 300+ GB. But I see PLE low all the time as low as 50 sec.! When Tried to dig into using "sys.dm_os_buffer_descriptors" found one clustered index (PK) taking 50-60GB as Cached, other index low cached sizes, may be another 5-6GB combined. […]
Query optimization - Hi all, I have one "heavy" query on my DB. It executes 2400 times per day and I don't know how to optimize it. Do you have any idea? Thanks. DECLARE @time datetime, @rowcount int 2400 select @time = dateadd(-HH, 24, GETUTCDATE()) WHILE (@rowcount=2400) BEGIN ;WITH CTE_1 AS (SELECT TOP 2400 * FROM dbo.Table1 WHERE […]
SQL Server 2017 - Development
Composite primary key tagged to identity - Is it possible to create a table with composite primary key(ID+Identity (1,1)) and identity will increment individually for each composite key value pair. Ex: ID       IdentityCol        1           1 1 2 2 1 2 2 2 3 2 4 3 1 3 2 As more rows are […]
SQL Server 2016 - Administration
Query store - Single query hash values multiple query id - I am trying to understand how to pin plan , I see a single query hash value however I see multiple query_id for the same  query hash value. Below is the sample SQL. It looks like sometimes it is able to use the plan and sometimes it is creating a new plan leading to possible […]
SQL Server 2016 - Development and T-SQL
verifying procedure with data entered - Hi clever people I've created the following procedure below that, when I enter a SA ID number (SSN in the west I imagine)  it tells me whether the number entered is false or not. Below the procedure is a table creation where I enter a row that includes the Idnumber column whére I enter the […]
Results different in Azure Data Studio vs SSMS -   Any idea why this would be the case? I see the result in Azure Data Studio but some of the strings are truncated in SSMS. Also, if you notice, IIADR3 has a length of 1, but it’s not space or null. So, not sure what it is. Wondering if you guys came across this […]
Procedure to validate an SA identity number - Hi Guys I am trying to create a procedure that will validate a South African ID Number (I think in the US this would equate to a SSN) based on the below reasons and I need help from you clever guys please as I am completely stuck. The procedure must evaluate to the id number […]
Conversion Rounding - I'm finding that in 2016 the script included at the bottom will return 3.27 for the value 3.275 but I would expect it to be 3.28 because the 5 in the thousandths decimal place would round up.  The other two values act as expected where a 4 rounds down and a 6 rounds up. Any […]
Development - SQL Server 2014
Rewriting a query with union all - I have a table with the following test data: Period   Item      Size        Qty         Amount Budget Jeans     S              10           100.00 Budget Jeans     M            10           100.00 Budget Shirts     S              10           150.00 Budget Shirts     M            10           150.00 Last        Jeans     S              1              10.00 Last        Jeans     M            1              10.00 Last        Shirts     S              20           200.00 Last        Shirts     M            20           200.00 […]
SQL 2012 - General
Unusual behavior with LARGE query - I've got a query that recently started performing badly (long running) and at times it will run indefinitely, and other times it runs in 90s (which is still bad).  It's basically a combination of 8 selects with UNION ALL...(the query pulls from tables, and a massive view). Indexes have been rebuilt, statistics updated, and there's […]
SQL Server 2019 - Development
Wrap your SQL into HTTP REST endpoints automagically ^_^ - Howdy guys, I'm looking for BETA testers for the following thing. It basically allows you to automatically generate HTTP REST endpoints, wrapping your database tables, and/or custom SQL statements. If you want to test it, I would be eternally grateful, and if you (God forbid) find a (severe) bug in it, I'll throw you a […]
Why does SUM from one table rises if I do an INNER JOIN with another table? - I can't figure this out... If I write this query... SELECT SUM(d.Quantity) FROM Invoice i INNER JOIN InvDet d ON i.InvoiceId = d.InvoiceId I get the SUM that I want, but if I do an inner join with another table I get much larger sum. SELECT SUM(d.Quantity) FROM Invoice i INNER JOIN InvDet d ON […]
Unable to figure out the correct query - Hello, I need help in answering this query. I just cannot get it right. I have attached the tables for reference. A record company requests the names of all recording artists, as well as the number of rock songs each artist sings. Note that some artists may not sing any rock songs but should still […]
Reporting Services
RS only answer IPV6 requests - Hello Friends, My environment SQL Server 2014 Enterprise Edition. Running Reporting Services in Native Mode using RSWindowsNTLM as unique authentication method. Directly in the server console Report Server works ok, open everything, when I try to do the same thing from a workstation, the report server keeps asking authentication and goes blank, when I enable […]
Disaster Recovery
HELP!!! - I have an older Windows 2003 Server running SQL Server 2008, I need to move this to a Windows 2019 Server running SQL server 2016 and I'm at a loss on how to do it. I was hoping I could just back up every database and including master, model and msdb and restore them I've […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. 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

 

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