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

Daily Coping Tip

Think of something you’ve always wanted to do and never tried

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.

Retraining the World

Microsoft has announced a training initiative to help people around the world acquire digital skills. They are using their resources from Microsoft, LinkedIn, and Github to try and accomplish three big things: find jobs and their skills requirements, provide content to help people gain skills, and make low cost certifications and job-seeking tools. At a time when many people are worried about th future, it's good to see them making an effort to help.

You can read about this in a blog from EVP Bad Smith. In addition to using their existing resources, that are also giving cash to non profits that are working to assist people in preparing for and finding new jobs. They also have efforts to help organizations learn to retrain and re-skill their existing workers.

I think lifelong learning, especially in different areas, is a critical skill. While there may be some careers that don't require lots of new learning, many do. Some auto mechanics constantly must learn about new vehicles. Some may get by on old skills, but fewer and fewer over time. Most other professions that move beyond entry level require new skills.

Perhaps more importantly, and especially in technology, we need to continue to improve our existing skills. While changing employees is costly, if we move to more remote work, more independent work that will force more documentation and sharing for information among people, I could see job security becoming more tenuous in some ways. Certainly the ability to solve more problems, or get help from others, will be important as we may potentially be evaluated more independently over time.

Investing in learning some new skill has always been a gamble, and no shortage of people have started down some path, only to find it doesn't produce them enough job opportunities, or perhaps not well enough paying prospects. Microsoft, and many other resources, are reducing the cost in our industry. You don't need to buy a class or pursue a degree, but you do need to invest time, as well as work on your own to build and refine the skills you've learned.

Pass along these resources to others that might need them, and don't forget to take advantage of them yourself if you want to make take change and make changes in your career path.

Steve Jones - SSC Editor

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

 
 Featured Contents

Availability Groups with Docker Containers

rafaelrodrigues from SQLServerCentral

Build a SQL Server AlwaysOn environment with docker

How to Create an Ubuntu PowerShell Development Environment – Part 3

Additional Articles from SimpleTalk

Running SQL Server in a container may seem daunting at first, but it’s easy once you understand the handful of commands needed. In this article, Robert Cain demonstrates how to run SQL Server in a Docker container on Ubuntu.

SQL Server Licensing and SQL Monitor

Additional Articles from Redgate

How well do the SQL Server licenses you own match up with what you need for your current use? William Durkin explains how to use SQL Monitor to find out.

From the SQL Server Central Blogs - Three Ways to Create a Temp Table

alevyinroc from FLX SQL

Taking it back to SQL 101 today because I recently saw something that floored me. I’m a big fan of temp tables. I use ’em all over the place...

From the SQL Server Central Blogs - Database Fundamentals #26: The Primary Key War

Grant Fritchey from The Scary DBA

There is a war about primary keys in the database world. There are two camps. The first camp believes that primary keys should only ever be created on meaningful...

 

 Question of the Day

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

 

Getting Subtotals

I am testing some aggregations and have this setup code:
CREATE TABLE ProductSales
( SaleID INT IDENTITY(1,1) NOT NULL CONSTRAINT ProductSalesPK PRIMARY KEY
, ProductCat VARCHAR(100)
, ProductName VARCHAR(100)
, SaleDate DATETIME
, SaleTotal NUMERIC(10,2)
)
GO
INSERT dbo.ProductSales
    (ProductCat, ProductName, SaleDate, SaleTotal)
VALUES
    ('Laptop', 'HP Spectre', '2020-01-02', 100 ),
    ('Laptop', 'Lenovo Thinkpad', '2020-01-05', 200 ),
    ('Laptop', 'AlienWare', '2020-02-02', 300 ),
    ('Mobile', 'iPhone', '2020-02-12', 50 ),
    ('Mobile', 'Samsung Galaxy', '2020-03-12', 100 ),
    ('Watch', 'Apple Watch', '2020-02-22', 200 ),
    ('Watch', 'Garmin Forerunner', '2020-02-23', 400 )
GO
I want to run a sum by month. I have this code:
SELECT 
ps.ProductCat
, MONTH(saledate)
, SUM(ps.SaleTotal) AS TotalSales
 FROM dbo.ProductSales AS ps
 GROUP BY ps.ProductCat, MONTH(saledate)
 WITH XXXX
Which keyword(s) replaces the XXXX and gives me less rows in the result set?

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)

Partitioning Heaps

Can I partition a heap table?

Answer: Yes

Explanation: Yes, you can partition a heap, like you would any other table. Ref:

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
Upgrading from SQL Server 2012 to SQL Server 2017 - Any Tips or Gotchas - We are running SQL Server 2012 SP4 Standard Edition on Windows Server 2012 R2 Standard Operating System. We would like to do an in-place upgrade to SQL Server 2017 in a non-production environment using the Developer Edition. Are there any tips, pitfalls, or gotchas that we should be aware of. Please share anything that may […]
Administrating Analysts - Hi Guys, I was just wondering if any of you guys would be willing to share your experience or have any advice on how to manage a situation we are seeing. So we have a back end data warehouse, fairly standard setup with an overnight load and SSRS reports etc. We also have a bunch […]
Host database - I have database currently sharing with other DB's. I don't have any issues at this point in terms of performance.The only problem is it's standalone. If ever it goes down then there would be impact on the application. So is that a good option to have db on it's own server instead of sharing with […]
SQL Encryption - I am looking at encrypting some of the data was wondering if you have used encryption and looking for any inputs and thoughts based on there use. Thanks in advance!
SQL Server 2017 - Development
Expression expression runtime failure in SSIS - Hi Team, I have the following expression in ssis and the value of  @[User::ExecutionId]=12dfg "##stg_mdif_"+ @[User::ExecutionId] I  need the final expression to be "##stg_mdif_12dfg".I tried different ways to parse it but SSIS expression is failing. Please let me know if you need any further information.
Query taking more than 4 hrs. - Any recommendations/suggestions? - One of our stored procs has been running for more than 4 hrs. and we have to finally kill it as it is taking quite and causing blocking...also this shouldn't take this long....we've come to a point and identified the batch of code that is causing the problem. Our indexes and stats are all tuned […]
Get all information from within a trigger - Hello from Portugal. I manage a database for a customer, and this database has been developed and used from a fistful of developers and many programs, since it is living for about 209 years now. This database has a main table, where many information are in. We now have faced the fact, that anything is […]
SQL Server 2016 - Administration
SQL 2016 and 2017 on same machine? - Long story, I'll spare the details.  I have a machine with SQL 2016 Standard installed.  I would also like on a short term basis to install SQL 2017 Developers on the same machine; without it "breaking" the 2016 version.  Is this possible?  Thanks!  
Development - SQL Server 2014
Function test questionnaire help - qq Hi clever people! The following is part of a TEST QUESTIONNAIRE. Although in the following two part question it seems silly to create a function and there are other, better ways to do this the test questionnaire is about CREATING A FUNCTION. Please bear that in mind. The following are the two tables followed […]
SQL Server 2019 - Development
Unusual use of the WHERE clause - I am working an exercise problem where the solution provided has a WHERE clause used in a way I have not seen before.  The question asks,  "to show the name and numbers of all salesmen who had more than one customer." Although the SQL online documentation shows an example of using WHERE with a comparison […]
XML parsing/shredding - Hello, not sure if this is the right subform to post this in, but anyhow... I have a few tables that all has a column with an XML datatype in it, with lots of data this column. Each of these tables has about 10-20 million rows. The XML data structure is pretty simple but has […]
SQL Server Newbies
Calculate Target Column - Hi, I have below table Sum of AP1 = 1764. I need to sql query to calculate Target column for Week  Number .Please help to calculate
General
What should be the Data Type for the list of columns below for effective queryin - Hi all, I want to get the basics right, and I am in the middle of pulling 1 million rows approx into a table below. For effective querying in the future can someone please advise the data types I should use for the below columns when creating initial table. I have displayed an example of […]
Analysis Services
How to get the SSAS Server administrators in MDX query? - Hello, Is there any way to get the list of server administrators from SSAS in MDX query? Thanks
COVID-19 Pandemic
Daily Coping 2 Jul 2020 - Today’s tip is share a happy memory with someone who means a lot to you. http://voiceofthedba.com/2020/07/02/daily-coping-2-jul-2020/
 

 

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

 

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