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

Comforting Habits

I was chatting with a friend recently about routines and some of the helpful or silly things we do. I mentioned that when I played adult baseball, we often had Sunday morning games and a routine of mine was to drive to town, stop at a 7-11, and get a large cup of coffee and an apple fritter. It was a comforting habit that I still have today, often stopping when I have a morning flight to do the same thing in the way to the airport.

Only in Denver though, not when I'm flying out of other cities and returning home.

At another job, I rode my bike to work. However, I'd drive Monday morning and leave my car at work, taking it home Friday afternoon. In between I'd commute on a bicycle 10-12 miles each way. On Monday, I'd buy a half dozen bagels for the week, which I'd leave in my office. After riding in and showering, I'd toast a bagel and have that with my coffee. It was a nice way to start the day while I scanned email or had a morning meeting.

Apparently, many of my routines revolve around food.

I have other habits, like waking up and checking my email before doing anything else. Not always, but most days I'll stir, give up on trying to sleep, and scan email from bed to see what is in store for the day. I don't always get up and go to work, but I can mentally prepare myself for how the workday will go. I've often found this helps me ease the way into the day, and I'm less stressed when I've broken the question of the day or had some other issue. I am prepared for what I'll face in the next hour after relaxing with my wife for a bit longer.

Routines not only bring us comfort, but they ground us in the chaos of the real world. Even if we have lost control of our work, with others pressuring us to meet deadlines or fix a broken system, a routine helps us to react calmly and not panic.

Even during security or failure incidents, which can be very stressful, I'd start the issue with a blank notebook page, writing a few known facts down on paper and starting to think forward as to how I'd manage staff. Often this exercise had me making initial decisions about who would work now and who would go home to come back later and relieve people. This was before I knew the scope or details of the problem. Even though I often had to change my plan, having a plan to change gave me comfort.

Think about the repetitive things you do on a daily or weekly basis. Think about the things you do in response to periodic events. What comforting habits do you have that help you get through the day or just bring a smile to your face.

Steve Jones - SSC Editor

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

 
 
  Featured Contents
SQLServerCentral Article

Connecting Streamlit to Upload Data to Snowflake

Shruti Dhumak from SQLServerCentral

How to create a connection for StreamLit and Snowflake to upload data for visualization

External Article

Data Warehouse Considerations - SCD Type 2 vs Overwrite Dimension Tables

Additional Articles from MSSQLTips.com

How we handle data warehousing updates to dimension tables is crucial and this article covers Slowly Changing Dimensions versus overwriting tables.

External Article

The ROI of SQL Prompt

Additional Articles from Redgate

Find your personal ROI in under 1 minute. And see how many working days you and your team could save in coding time with SQL Prompt!

Blog Post

From the SQL Server Central Blogs - Data Strategy Checklist for 2025

Joyful Craftsmen from Joyful Craftsmen Blog

The post Data Strategy Checklist for 2025 appeared first on Joyful Craftsmen.

Blog Post

From the SQL Server Central Blogs - Grinding Away: Brent Ozar

Steve Jones - SSC Editor from The Voice of the DBA

Brent Ozar is a very successful DBA/consultant/speaker/business owner in the data platform space. Many of you have likely seen him speak, read his blog, used his sp_Blitz script, or...

The Definitive Guide to Azure Data Engineering: Modern ELT, DevOps, and Analytics on the Azure Cloud Platform

The Definitive Guide to Azure Data Engineering: Modern ELT, DevOps, and Analytics on the Azure Cloud Platform

Site Owners from SQLServerCentral

Build efficient and scalable batch and real-time data ingestion pipelines, DevOps continuous integration and deployment pipelines, and advanced analytics solutions on the Azure Data Platform. This book teaches you to design and implement robust data engineering solutions using Data Factory, Databricks, Synapse Analytics, Snowflake, Azure SQL database, Stream Analytics, Cosmos database, and Data Lake Storage Gen2.

 

  Question of the Day

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

 

DCL

We have DDL, DML, and DCL. What is DCL used for?

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)

Function Defaults

I have created this function in SQL Server 2022:

CREATE FUNCTION dbo.AddInt (@one INT, @two INT = 1) RETURNS INT AS BEGIN RETURN @one + @two END

How can I call this and invoke the default value for @two?

Answer: SELECT dbo.AddInt(4, default)

Explanation: You must provide all the parameters for a function, but if you know there are defaults, you can use the DEFAULT (or default) keyword. Ref: CREATE FUNCTION - https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16#syntax (see the parameters section)

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 2016 - Administration
Query is filling Tempdb - I have query which is filling TEMPDB I need suggestion how to modify this query to which can minimize the TEMPDB space to fill update #TempShow1 set Name = case when a2.ID is NULL then a1.name else a2.name end, Address = case when a2.ID is NULL then a1.Address else a2.Address end, State = case when […]
SQL Server 2016 - Development and T-SQL
Script is filling Tempdb - I have query which is filling TEMPDB I need suggestion how to modify this query to which can minimize the TEMPDB space to fill update #TempShow1 set Name = case when a2.ID is NULL then a1.name else a2.name end, Address = case when a2.ID is NULL then a1.Address else a2.Address end, State = case when […]
SQL Server 2012 - T-SQL
Group records during capture - I have a table which is being written to by another application. A few things of note I can't alter schema, or unable to upgrade the sql version at this time. I need some help in a couple of areas. The first is to grab the last 15 minutes of information from this table. The […]
SQL Server 2019 - Administration
Filter a SQL Server Audit with a predicate - Hi Gents, Silly question, but it's been a long time since I've done this. I need an audit of all successful and failed login attempts, so I created an Audit, but I don't want to log everything, so I added a filter: WHERE ([action_id]=(538990668)) based on https://techcommunity.microsoft.com/blog/sqlserver/filter-sql-server-audit-on-action-id--class-type-predicate/384140 SELECT [class_type] FROM sys.dm_audit_class_type_map WHERE [class_type_desc] = 'LOGIN'; SELECT […]
Copy a large table from one table to another - Hi, I have large table with 75 columns and 1.1 billion rows. Want to know the fastest way to copy from one table(non partitioned) to another(partitioned) table. Did anyone tried this. If yes, how long it took to load the data. I tried SSIS package with multiple threads, select- insert in batches and OPTION MAXDOP. […]
SQL Server 2019 - Development
how to generalize the LAG function so it keeps looking until a value is found? - Hi everyone There are situations where a value for a particular day is NULL so I use the previous day's value hoping it isn't NULL.  I use LAG for this.  The problem is that sometimes even the previous value is NULL so I have to use LAG(2) to get the 2nd previous value.  This approach […]
How to speed up this query? - Hi everyone I have a query that is taking a real long time.  It takes close to 30 minutes to process about 14 million records.  Is there any way to speed it up? Query: DROP TABLE IF EXISTS #TestTable DROP TABLE IF EXISTS #TEMP1 CREATE TABLE #TestTable ( [UNIT] [nvarchar](10) NOT NULL, [PURCHASE_DATE] [date] NOT […]
Testing
Understanding allowed topics for testing - Hi, I am a first time writer looking to author some content here. I am in the software testing industry. Are we allowed to submit content that is not related to SQL or databases or should they all be related to databases?   Thanks, Arun
Analysis Services
Issue with IIF - I am creating a new measure in an SSAS cube and encountering an issue. The result is being displayed in an Excel pivot table sourced from the cube. Here’s the code I’m working with: MDX CREATE MEMBER CURRENTCUBE.[Measures].[New Column] AS IIF( [Date].[Month Of Year].[1] OR [Date].[Month Of Year].[2] OR [Date].[Month Of Year].[3], -- Logical condition […]
Integration Services
Date data type not recognized with oledb type provider - Hello, We recently made the following observation working with  VS2022  combined with the SSIS extension 'SQL Server Integration Services Projects 2022  (version 1.5) When creating a connection manager the driver of choice is set to  SQLOLEDB.1 With these type of connection string the SQL datatype 'date' is not recognized and set to  WSTR(10) , be […]
Suggestions
Peer review SQL Central articles - Hi, I would like to contribute to SQLServerCentral in peer reviews. As there are many articles that need to be reviewed on a daily basis, i assume this site needs some reviewers. May i know the process to become reviewer and start contributing.?
SQLServerCentral.com Website Issues
Topic marked as spam - by mistake? - I received the following notification a few hours ago. It seems legit but has been marked as spam – should it be resurrected? harrylune wrote: Do you have any advice on how to set up git repositories for the things indicated in the title? I'm particularly interested in hearing from anyone who have experience with […]
Third Party Products
ESP Scheduling Tool - Has anyone ever used Broadcom's ESP Scheduling tool? I have questions regarding it and the use of password-protected SSIS packages if anyone can help.
SQL Server 2022 - Development
Getting blockage on Update Statement - Hi, Need your help. I've a SP that is using Update statement on a table. 2-3 processes are updating this table at the same time. I'm getting frequent blockage. How can we handle to prevent blockage? Will using SET XACT_ABORT ON can help? Or setting to isolation level can help? SET TRANSACTION ISOLATION LEVEL READ […]
Which selection criteria is more efficient. - Is it more efficient to search on an int than a nullable DateTime? I have a table where I can choose to search on an int field in the where clause or a nullable datetime field looking for nulls in the where clause. Both methods return the same resultset. While I am most likely nitpicking, […]
 

 

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

 

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