SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

The Learning Choice

I advocate learning constantly for those of us in technology. This might be especially important for data professionals as we are at the nexus of so muc activity these days. Data is important, our systems are under scrutiny for security, there is an every growing set of applications that want to connect, and we often struggle to keep up in a fast-paced, DevOps world. It feels like my plate is overflowing with the need to understand PowerShell, JSON, the cloud, Hadoop and its myriad of related technologies on the Microsoft Stack, machine learning, data science, statistics, and when I have time, make sure I'm up to date with SQL.

Recently I've run across a few pieces that ask the question about where to spend time. There's a blog on R v Python (I've seen quite a few of these) and a thread on deciding if ML skills are something a database developer should learn. These are just a few of the ones I've seen in the last month, as I guess lots of people are thinking and writing about New Year resolutions and goals.

We have a limited amount of time for learning each day, week, month, or year. We might be able to increase that for a short time, perhaps months, but all of us need some balance in life. Given that there's a limited amount of time, and that we need some focus and practice over time to absorb skills, where do you spend your effort in learning?

Jeff Moden is an advocate of you sharpening your T-SQL skills with deep learning, as he sees this as one of the main reasons that applications perform poorly (and people post in our forums). Others lean towards adding new skills, perhaps adding SSIS proficiency or transitioning your analysis skills to Extended Events. Still others might seek to become more generally rounded by spending time on C# or Python.

There are also other views, such as focusing on the skills you need in your current position. If you're not happy, maybe you want to devote learning effort to get a job in an area where you're passionate. Or maybe you just want to make more money, and are willing to spend time in those technologies that are paying more.

The choice is up to you, and I can't give you the answer that suits your path. You must find a balance between work and the rest of life, and make the choices that best fits you. I don't want to imply this is easy. Thinking about the things that really matter to you and affect how you approach each day is a difficult exercise. My advice is that you go in one of two ways. If your career is something that you feel passionate about, focus your learning in a way that will help you find a job that brings you purpose. If you just need a job to pay the bills, learn things that increase your earnings, but ensure that you have family, faith, hobbies, or some other endeavor outside of work that brings purpose and fulfillment to you.

Steve Jones from SQLServerCentral.com

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

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 5.0MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

SQL in the City

Sign up for more free training from Redgate

Redgate has committed to hosting a free virtual event in every quarter of 2018, and will be kicking this off on February 28 with a livestream themed around data privacy and protection. The agenda has now been released, so you can see who will be presenting, what they will be presenting, and how you can tune in to watch. Find out more about the sessions and register your place

SQL Provision

NEW SQL Provision: Create, protect, & manage SQL Server database copies for compliant DevOps

Create and manage database copies effortless and keeps compliance central to the process. With SQL Provisions virtual cloning technology, databases can be created in seconds using just MB of storage, enabling business to move faster. Sensitive data can be anonymized or replaced with realistic data to ensure data is protected as it moves between environments. Download your free trial

Featured Contents


Adaptive Query Processing – Interleaved Execution

Wayne Sheffield from SQLServerCentral.com

Interleaved Execution allows SQL Server's query optimizer to get accurate cardinality estimates in places where it couldn't before. More »


Mobile Report Publisher – Dashboards Everywhere

Additional Articles from SimpleTalk

The new feature, Mobile Reports, was added to SSRS in 2016. It provides the ability to create attractive and useful dashboards that can run on devices and most browsers. Robert Cain shows you how to get started building Mobile Reports with the Mobile Report Publisher. More »


Introducing database automation with the SQL Toolbelt

In this post, Mary Robbins explains how Absa bank improved development efficiency and minimized risk by implementing SQL Toolbelt. More »


From the SQLServerCentral Blogs - Managing SQL Prompt Code Analysis Rules

Steve Jones from SQLServerCentral Blogs

I work for Redgate and write about products. I’ve got a series of SQL Prompt posts here on little things... More »


From the SQLServerCentral Blogs - Layman’s Guide to Performance Tuning

MarlonRibunal from SQLServerCentral Blogs

Performance tuning is one of those things that is hard to get right when you do not have an established... More »

Question of the Day

Today's Question (by Steve Jones):

I ran this code in my database:

CREATE RULE dbo.DBASalaryRange
@salary > 52000
AND @salary < 99000;
EXEC sys.sp_bindrule @rulename = N'dbo.DBASalaryRange' ,
                     @objname = N'dbo.Employees.Salary';


Now I execute this:

CREATE RULE dbo.NewDBASalaryRange
@salary > 52000
AND @salary < 150000;
EXEC sys.sp_bindrule @rulename = N'dbo.NewDBASalaryRange' ,
                     @objname = N'dbo.Employees.Salary';


What happens when I execute this statement?

UPDATE dbo.Employees
 SET Salary = 120000
WHERE EmpID = 1 

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

We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Rules.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.


Design and configure SQL Server instances and databases in support of high-throughput applications that are mission-critical and provide consistent response times in the face of variations in user numbers and query volumes. Learn to configure SQL Server and design your databases to support a given instance and workload.

Pick up your copy of this great book today at Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have a dataframe called "sacks" that looks like this:

> sacks
# A tibble: 5 x 5
   Rank Player                        Sk Years     Tm   
1     1 "Bruce Smith+\\SmitBr00"     200 1985-2003 2TM  
2     2 "Reggie White+\\WhitRe00"    198 1985-2000 3TM  
3     3 "Kevin Greene+\\GreeKe00"    160 1985-1999 4TM  
4     4 "Julius Peppers\\PeppJu99"   154 2002-2017 3TM  
5     5 "Chris Doleman+\\DoleCh00"   150 1985-1999 3TM

I have a second data frame that looks like this:

> sacks2
# A tibble: 5 x 5
   Rank Player                          Sk Years     Tm   
1     6 "Michael Strahan+\\StraMi02"   142 1993-2007 nyg  
2     7 "Jason Taylor+\\TaylJa03"      140 1997-2011 3TM  
3     8 "DeMarcus Ware\\WareDe99"      138 2005-2016 2TM  
4     9 "Richard Dent+\\DentRi00"      138 1983-1997 4TM  
5    NA "John Randle+\\RandJo00"       138 1990-2003 2TM   

If I want to combine these into sacks1to10 as a single data frame with the same number of columns which command do I use?

Answer: sacks1to10 <- rbind(sacks, sacks2)


The rbind function will combine the rows of two data frames into 1 with the same number of columns.

Ref: rbind - Combine R objects by rows or columns - click here

» Discuss this question and answer on the forums

Featured Script

Remove Database Encryption Key on all user databases

PremKumar Raju from SQLServerCentral.com

This script can be used to remove transparent database encryption on all the user databases. 

If the database size is big the decryption process may time and you need increase the time in the WAITFOR DELAY option in the code.

More »

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 : SQL Server 2017 - Development

Stored Procedure Help and dealing with Where Clause - I can't see the forest through the trees. I am passing parameters from SSRS to a SP. One if the...

SQL Server 2016 : SQL Server 2016 - Administration

Access users can't use SQL 2016 (?) - I'm migrating several Access backends from SQL Server 2005 to SQL Server 2016. I have successfully gotten the ODBC connections...

DB compression with San compression - Hi, We have table compression on for our big DW fact tables: Columnstore for some and traditional row store compression. Currently...

SQL Server 3rd party Backup tool - hi, we have a DB of 20 TB in 2 files, got lot of unused space and need some shrink, but...

I need a opinion - Hello, i have a discussion with a co-worker about normal code or dynamic code in a OLTP. The example is: create table...

When adding new column to table, where is that data stored ? - When a row exceeds 8060 bytes, a ROW_OVERFLOW_DATA page and pointer are created, to fit the 8KB page size limit. What...

SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Extract Text around comma and space into other columns - From another post in this site, I got a working query to give me the text on the left and...

Calculating sum of days/weeks - Hi, I have a calendar table that have the days, I need to add the following columns Days in a...

Throw an Error on a procedure - Hi, I have a procedure that does MERGE. however I have new changes, please see below, these are some of the...

Sort comma separated value in SQL Table - Hi  I want to sort a column value alphabetically which is already in a sql table to something like below...

Trigger insert - Hi, I have a table that keep track of the store procedures and it log errors. I want to add the...

SQL Server 2014 : Administration - SQL Server 2014

View VS Select from Table - Experts, We have a procedure which select from a lot of tables. Will there be any performance improvement if we create...

SQL Server 2012 : SQL 2012 - General

TDE and Logshipping - Hi We already have an established Log Shipping environment.The secondary has the databases in the 'Non recovery mode' I have just enabled...

Distribution clean up: distribution job failure - Dear All,   I'm currently having an issue with the "Distribution clean up: distribution" job which is a default job created for...

SQL Server 2012 : SQL Server 2012 - T-SQL

Automate LogSHipping for multiple databases - I need to set up log shipping for about 100 databases. Log backup would occur ever 4 hours and would...

Insert data in multiple batches for millions of record - Hi, I have table x, table y table x have millions of record, so i want to insert data by multiple batches...

SQL Server 2008 : SQL Server 2008 - General

How to copy encrypted data to another database - I have two databases that need to share encrypted data. I created a master key in both databases (both using...

SQL Server 2008 : Working with Oracle

Cannot convert between unicode and non-unicode string data types - I am working on an SSIS project, to pull data from Oracle 10.2g into SQL Server 2008R2, 64-bit. This project...

SQL Server 2005 : SQL Server 2005 General Discussion

How to get middle rows data from a set of rows in a table - Hi Friends, I have a table of 1000 records of data. If i want to get data of rows from 501...

SQL Server 7,2000 : Data Corruption

I/O error 170(The requested resource is in use.) - Hi all I have some problems with one environment.. It was a virtual cluster active/passive with 2 virtual nodes and virtual disk...

This email has been sent to {user_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.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com