SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

The Voice of the DBA

Merry Christmas 2017

Merry Christmas and Happy Holidays from everyone at SQLServerCentral and Redgate Software.

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
Database DevOps

Continuous Delivery for SQL Server Databases

Spend less time managing deployment pain and more time adding value. Find out how with database DevOps

SQL Monitor

Don’t just fix SQL Server problems, prevent them from happening

SQL Monitor helps teams looking after SQL Server be more proactive. Not only does SQL Monitor alert you to current issues, it gives you the information you need to stop them happening in the future. Download SQL Monitor now and get a 14 day free trial

Featured Contents

 

The Case of the Shrinking CFO, err Database

Edward Polley from SQLServerCentral.com

Shrink SQL Server databases quickly and with virtually no contention. More »


 

Cascading Update and Delete for SQL Server 2017 Temporal Tables

Additional Articles from MSSQLTips.com

Ameena Lalani looks at cascading updates and deletes when using temporal tables in SQL Server. More »


 

Support for static data added to Source Control for Oracle

With the speed of software development increasing, more and more companies and organizations are recognizing that version controlling code is becoming as important for databases as it is for applications. In recognition of this, Source Control for Oracle has been upgraded so that it now version controls static data within databases as well as database schemas. More »


 

From the SQLServerCentral Blogs - T-SQL Tuesday #97 – My learning plan

Mala Mahadevan from SQLServerCentral Blogs

This month’s T-SQL Tuesday is hosted by…er..yours truly. I picked a topic that usually comes up for me every December... More »


 

From the SQLServerCentral Blogs - Accessing AzureML models through SQL Server in-database R services

Enrico van de Laar from SQLServerCentral Blogs

In a previous article I discussed the various methods available in SQL Server 2016 & 2017 to perform in-database analytics. In... More »

Question of the Day

Today's Question (by Steve Jones):

It's the start of Christmas week and fun questions. The question today is who said this?

"We elves try to stick to the four main food groups: candy, candy canes, candy corns and syrup."

The answer comes from this data set. What's the order by?

 SELECT TOP 1 answer = SomeName FROM ( VALUES ('Ebenezer Scrooge', 'A Christmas Carol', 'Old', 'Fiction', 'London'), ('Dumbledore', 'Harry Potter and the Sorcerer''s Stone', 'Very Old', 'Fantasy', 'Hogwarts'), ('Frosty', 'Frosty The Snowman', 'Infant', 'Animated', 'A small town'), ('Buddy', 'Elf', 'Teenage', 'Comedy', 'New York') ) AS a (SomeName, Movie, Age, Genre, Locale) ORDER BY 

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 7 points in this category: humor.

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

ADVERTISEMENT

The Phoenix Project: A Novel about IT, DevOps, and Helping Your Business Win

The company's new IT initiative, code named Phoenix Project, is critical to the future of Parts Unlimited, but the project is massively over budget and very late. The CEO wants Bill to report directly to him and fix the mess in ninety days or else Bill's entire department will be outsourced.  Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I have a table with a few rows in it.

 ContactID FirstName 1 Tom 2 Peyton 3 Eli 5 Drew 

I have this code. What happens when I run this?

 DECLARE @name VARCHAR(100) = 'Bob'; SET @name = (SELECT c.FirstName FROM dbo.Contacts AS c WHERE c.FirstName = 'Joe' ) SELECT @name 

Answer: NULL is returned

Explanation:

SET will change the value of the variable, which in this case is an empty return set. This is returned as NULL.

Ref: SET - click here


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

case statement - I'm using two cases separately to display the result as two columns, but I'm getting the result of only first...


SQL Server 2016 : SQL Server 2016 - Administration

inplace upgrade for 2014 to 2016 with readable secondary. - I will be taking a VMWARE based 2014 AG that has one active and one read only node and doing...


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

Table updates on large table with no ID or large gaps between IDs - Hi Folks, I have a requirement to update a field on every record on a series of large tables (> 30M...


SQL Server 2014 : Development - SQL Server 2014

is there a way to auto-gen crud sprocs in ssms 2017? - Is there a way to auto-gen CRUDsprocs in SSMS 2017? For example, a basic User table might just need cookie...

Overriding error message sent back - I have a table with a constraint on 2 columns (Which are keys into 2 other tables) and I want...


SQL Server 2012 : SQL Server 2012 - T-SQL

INDEX range_scan_count - Hi, I am experimenting with various permutations and combinations to understand how the range_scan_count gets populated by the function sys.dm_db_index_operational_stats. Below case...


SQL Server 2008 : SQL Server 2008 - General

Records in a Table - Hi   How we can get a list of all tables with No of records in a Database Thanks

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.
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 ©2017 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com