SQLServerCentral - www.sqlservercentral.com

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

Featured Contents

The Voice of the DBA

Halloween 2017

It's Halloween, and I'm at the PASS Summit. In all the years I've attended the annual event, I don't remember it being on Halloween, especially since that has been a holiday that I've spent with my children. I know quite a few people aren't attending the Summit this year with the scheduling and their own kids. However, for me, I'm about done. My youngest is 16, and unlikely to want to spend the holiday with Dad.

Halloween should also have some special meaning for data people, after all, we have a Halloween Problem in our systems that must be dealt with. Fortunately, the platform protects us, and if you want to know more, read Paul White's series. It's educational, informative, and interesting. Plus, who knows when someone might interview and decide to bring up the issue to see if they can stump you. If you want something that's perhaps a bit more fun, check out a few of Jason Brimhall's Halloween posts.

I don't know how celebratory the rest of the world is on Halloween, but it can be quite fun here in the US. I won't have a costume tonight, but I'm looking forward to seeing how all the data professionals look at tonight's opening reception. I'll take lots of pictures, and post them on my blog.

Happy Halloween.

Steve Jones from SQLServerCentral.com

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

ADVERTISEMENT
SQL Compare

The industry standard for comparing and deploying SQL Server database schemas

Trusted by 71% of Fortune 100 companies, SQL Compare is the fastest way to compare changes, and create and deploy error-free scripts in minutes. Plus you can easily find and fix errors caused by database differences. Download your free trial

Database DevOps

How mature are your database DevOps processes?

Complete Redgate’s Database DevOps Maturity Assessment to understand how mature your processes are, how you compare against your peers, and receive recommendations for improvements. Take the assessment

Featured Contents

 

Create SSRS Data Driven Subscriptions on Standard Edition

Bernard Beckett from SQLServerCentral.com

This will allow you to create "Data-Driven" subscriptions on your Standard SQL Server version. More »


 

Six Scary SQL Surprises

Additional Articles from SimpleTalk

The working life of the DBA can be punctuated by surprises, but they aren't generally nice surprises. This is especially true if the DBA is not checking and monitoring the databases for obvious things such as database corruption, and disk space. However, the really scary surprises are less obvious and provide fewer warning signs. Brent Ozar gives six scary surprises that can be avoided by the shrewd DBA. More »


 

From the SQLServerCentral Blogs - Why I Believe in the Data Architecture Review

Guy Glantser from SQLServerCentral Blogs

    We have a solution called Data Architecture Review. With this solution, we conduct a complete review of the customer’s data... More »


 

From the SQLServerCentral Blogs - All New Collations in SQL Server 2017 Implicitly Support Supplementary Characters

Solomon Rutzky from SQLServerCentral Blogs

As I was testing whether or not the new “Variation Selector Sensitive” ( _VSS ) Collations in SQL Server 2017 would assist... More »

Question of the Day

Today's Question (by Steve Jones):

What is the result of adding these two dates?

 DECLARE @dt1 datetime, @dt2 DATETIME SET @dt1 = '2017-10-31'; SET @dt2 = '2000-01-01'; SELECT @dt1 + @dt2 

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: Datetime Manipulation.

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

Pro SQL Server Relational Database Design and Implementation

Learn effective and scalable database design techniques in a SQL Server 2016 and higher environment. This book is revised to cover in-memory online transaction processing, temporal data storage, row-level security, durability enhancements, and other design-related features that are new or changed in SQL Server 2016. Get your copy today from Amazon.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

I run this code:

 SELECT EOMONTH('20170928', 3)

What date is returned?

Answer: 2017-12-31

Explanation:

The EOMonth function finds the end of the month for a date. There is a second parameter that changes the number of months from the date passed in.

In this case, the end of month is 2017-09-30. Adding 3 months to that gets to 2017-12-31.

Ref: Stairway to Advanced T-SQL Level 9: Compare, Modify, Derive and Validate Date and Time Values

EOMonth - 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

StartDate and EndDate in same column - I have a date column below RunDate , I want to create two column StartDate and EndDate like this StartDate = '2004-08-01' ...


SQL Server 2016 : SQL Server 2016 - Administration

ToolBox missing for Maintenance task - This morning I logged into SSMS SQL2016 to edit a maintenance plan. I would add a cleanup task. But I noticed...


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

What happens when delete query executed inside sql server engine , process in deleting file , how data page will be managed , how deleted data pages will be free for next use? - Hi Champs, I want to understand what happens when delete query executed in inside sql server engine , how page  de allocation...

Help with date ranges - Hi all, I'd like to know if anyone can help me with a good suggestion on how to achieve this. I have...


SQL Server 2014 : Administration - SQL Server 2014

Extended Events - sqlserver.query_memory_grant_usage - Hello Folks. Bit of a strange one - or else I am missing something here (high probability). I found some sample code to...

Perfmon does not start for named instance, but does for default instance. - Version in use is SQL Server 2014/SP2 CU5. I have encounted an error that others have also encountered about perfmon counters...

Mirroring in a WSFC environment - We are planning to set up mirroring for a small application db we're installing in our environment.  The infrastructure team...


SQL Server 2014 : Development - SQL Server 2014

Join on a Substring - I have a proc that runs nightly that moves data into another table.  The procedure joins on multiple tables one of...

Trying to speed up this 'GetWorkingDays' function. - I'm trying to redesign one of our working days functions. The idea is to calculate weekends (easy enough) but holidays...

Optimizing Query Using LInked Servers - Hello. Looking at an SP that used to run in a couple of seconds and does something like this : Select X,Y,U...


SQL Server 2012 : SQL 2012 - General

Where should I save stored procedures and user defined functions for use in all databases? - I have some generic utility stored procedures and user defined functions that I would like to define/save once, and have...

Transport error encountered when SOME queries run with batch terminator. Behaviour changes depending on text of query. WEIRD! - This is one of the weirdest issues I've ever seen. It's so unbelievable that I actually made a video to...

Convert list of columns into quoted, comma delimited list of columns - Summary:  I've got a working solution(s).  My question is, which is the best approach (if any)? Details:  I want to write...


SQL Server 2012 : SQL Server 2012 - T-SQL

How to find the first recurring character of a string. - I have a query that finds the first recurring character in a string. For eg : if @str = 'ABCCDA' then i...

Substring Question - Hi, I trying to extract the value from a field until a special character   eg: firstname.lastname  I only want firstname have...

PURGING DATA - HI All, I have an assignment, to Purging data, with conditions: 1. Keep the full data 6 months (keep all the records...


SQL Server 2008 : SQL Server 2008 - General

SQL versus program - Hi all, I'm posting my question in this 2008 forum because we're running SQLServer 2008R2, but it is more a general...

What else can take up space in a database besides tables - I have a database that says it's 108 GB USED - I verified with dbcc showfilestats as well as just clicking...


Data Warehousing : Analysis Services

Design considerations for a tabular model - I have a star schema already in existence (SQL Server fact table and numerous dimension tables). For a given tabular...


SQL Server 2005 : Administering

DDL Triggers and Permissions - Hi, I have created a DDL trigger to fire on the ALTER LOGIN statement. I then want to collect the event...

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