Newsletter Subject

Verifying Trees (2023-01-20)

From

sqlservercentral.com

Email Address

subscriptions@sqlservercentral.com

Sent On

Fri, Jan 20, 2023 08:26 AM

Email Preheader Text

SQLServerCentral Newsletter for January 20, 2023 Problems displaying this newsletter? . Featured Con

SQLServerCentral Newsletter for January 20, 2023 Problems displaying this newsletter? [View online](. [SQL Server Central]( Featured Contents - [Verifying Trees]( - [SQL Server point in time recovery]( - [From the SQL Server Central Blogs - New year, new role, and new book]( - [From the SQL Server Central Blogs - Creating a PostgreSQL Docker Container with a Volume on Windows]( - [Pro Encryption in SQL Server 2022: Provide the Highest Level of Protection for Your Data]( Question of the Day - [More ANSI_PADDING Tables]( The Voice of the DBA  Daily Coping Tip Take a different route today and see what you notice 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. Minimize Typing It couldn't have happened to a worse set of people, and I'm glad it did, but I'll still take a positive lesson out of this. A [hacker sent a typo in a command to a botnet]( and lost control. That's kind of funny, and I'm glad it happened. The less botnets, the better, IMHO. The coding in this software didn't have good error handling, which is a lesson in and of itself. Overall it seems many developers do a good job of error handling, but I still encounter more pieces of software that allow problematic input than I'd like. While we don't have great error handling in T-SQL, you can make some checks, and you should. That's not the big lesson for me. The bigger lesson is that we ought to do less typing in much of our daily work. The last decade has had me work often with companies looking to implement DevOps software pipelines and driving automation wherever possible. We want to limit the chances humans can make mistakes, which means we want to limit their typing. Or clicking, as is the case in much of today's software. Instead, we want to ensure all our code or commands are reviewed by someone, they are submitted to an automated pipeline, and they are validated or practiced on some system ahead of production execution. We ought to do this for no other reason than we want to ensure we have an audit trail, but preventing typos is good as well. I don't know if you can completely get away from typing, but we can reduce the number of human error mistakes if we include some static code analysis (including for commands), some peer review, some sort of unit testing, and pre-production deployment. A lot of mistakes I find are fairly simple ones. Common human error that occurs because we're busy, we're stressed, we're moving too fast, or we just miss something. Use the computer for one of its strengths. Tediously checking the simple things that humans do wrong. Steve Jones - SSC Editor [Join the debate, and respond to today's editorial on the forums](   Featured Contents [SQLServerCentral Article]( [Verifying Trees]( Glen Cooper from SQLServerCentral In this article, Glen Cooper provides code that allows you to process a tree, or undirected graph of data. Lots of hierarchies fall into this category and the ability to process them is valuable in many reporting situations. [External Article]( [SQL Server point in time recovery]( Additional Articles from MSSQLTips.com In this article, we look at how to do a point in time restore using TSQL and SSMS to recover a database to a particular point in time. [Blog Post]( From the SQL Server Central Blogs - [New year, new role, and new book]( James Serra from James Serra's Blog Happy new year to everyone! As I enter my 9th year at Microsoft, I have switched roles, and am now an Industry Advisor in Federal Civilian, helping our Federal... [Blog Post]( From the SQL Server Central Blogs - [Creating a PostgreSQL Docker Container with a Volume on Windows]( Steve Jones - SSC Editor from The Voice of the DBA This post looks at how to set up a PostgreSQL container on Windows using Docker for Windows. I’ve seen a few posts, but I had to cobble together some... [Pro Encryption in SQL Server 2022]( [Pro Encryption in SQL Server 2022: Provide the Highest Level of Protection for Your Data]( Additional Articles from SQLServerCentral This in-depth look at the encryption tools available in SQL Server shows you how to protect data by encrypting it at rest with Transparent Data Encryption (TDE) and in transit with Transport Level Security (TLS). You will know how to add the highest levels of protection for sensitive data using Always Encrypted to encrypt data also in memory and be protected even from users with the highest levels of access to the database. The book demonstrates actions you can take today to start protecting your data without changing any code in your applications, and the steps you can subsequently take to modify your applications to support implementing a gold standard in data protection.   Question of the Day Today's question (by Steve Jones - SSC Editor):  More ANSI_PADDING Tables I run this code to create a table and insert rows. What are the results that I see from the query? SET ANSI_PADDING OFF GO CREATE TABLE dbo.ANSIPADDINGOFF(charcol CHAR(20), varcharcol VARCHAR(20)) GO INSERT dbo.ANSIPADDINGOFF (charcol, varcharcol) VALUES ('c test2','v test2 ') GO SELECT '[' + a.charcol + ']', '[' + a.varcharcol + ']' FROM dbo.ANSIPADDINGOFF AS a GO Think you know the answer? [Click here]( and find out if you are right.    Yesterday's Question of the Day (by tomaz.kastrun) Rounding in Python What is the value of variable val3 (print command) in this Python code? import math as m val1 = round(m.sqrt(650.25),-1) val2 = str(val1) val3 = val2[-3] print(val3)  Answer: 0 Explanation: By decomposing the first step (calculating val1) we calculate the square root of 650.25, which is 25.5. The round function in Python works as Bankers rounding, making the 25.5 rounded to 26. For the reference, 24.5 would be rounded to 24. The bankers rounding works that numbers x.5 (e.g.: 1.5, 2.5, 3.5, 5.5, etc) are rounded to the nearest rounded to nearest even number. Since we are rounding with value -1, the result is not 26.0, but 30.0. Here is an example, how does the digit parameter works. When negative, it will round to whole numbers, when positive, it will round the decimal numbers. print(round(543.5, -1)) # Result: 540.0 print(round(543.5, -2)) # Result: 500.0 print(round(543.5553, 2)) # Result: 543.56 Converting to val2 is changing the number into string, and the result is still 30.0. The variable val3 is getting the 2nd (second) character from the end. The value in the string for position -2 is 0. number : 3 0 . 0 position:-3 -2 -1 0   [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 [Troubles with in memory OLTP performance degradation]( - I started with a new company recently and they use in memory OLTP which is something I haven't used before so I'm excited to try a new technology.  I've been there about a month now and I'm reading/watching everything I can on the feature but they're seeing some strange behavior that I could use some […] SQL Server 2016 - Administration [Job History says running, but Job Activity says idle]( - Hello experts, I'm hoping to get help with a strange issue. I got a request to stop a long-running SQL Agent job. The client correctly sees that the job history says the job is running. But when I checked the Job Activity Monitor, it says the job is idle and last succeeded at such-and-such a […] SQL 2012 - General [60 Second Rolling Avg With Different Starting Points]( - Hi, I have a table with columns: jobId, timeStamp (for duration per jobId) and tempData (see attachment). I have created a query that calculates 60 second rolling average by jobId. (you can see it at the end of the post) Where I am struggling is adding two additional rolling averages. Both of them would be […] SQL Server 2019 - Administration [SQL Server (Express) installation issue]( - Please be gentle.. newbie here ! I'm creating an install program (Using Advanced Installer, but I don't think that's relevant) to install SQL Express. I'm trying to do this as a quiet install with no user intervention. It's failing with a request for a password on the SQL Server Browser. I cant see how to […] [SQL Server 2019 or 2022]( - Hi Experts, We are planning to upgrade our SQL Servers from 2014 to higher version.Which is the best suitable upgrade 2019 or 2022, please advise.   Regards SQL Server 2019 - Development [Existing scalar function within a trigger is not found]( - Calling an existing scalar function within a trigger which is not found within the trigger (Msg 4121, Level 16, State 1) The error is the following: Msg 4121, Level 16, State 1, Procedure Sales.uTu_Customer, Line 12 [Batch Start Line 44] Cannot find either column "Hashing" or the user-defined function or aggregate "Hashing.CreateJsonInputForSha256SalesCustomer", or the name […] [Column name with text and column name]( - Hello all. I hope everyone's ok I have this query: SELECT cont, type, month01, month02, month03... FROM acum Where year=2022 I'd like that for each month it shows a text and the year, like Jan-2022, Feb-2022 and so on. Something like SELECT cont, type, month01 AS CONCAT( 'Jan-',year) , month02 AS CONCAT( 'Feb-',year) ... FROM […] [Stored procedure for top 1 from multiple tables and update 1 table in 1 query]( - I have two tables in this format below; Table Transfer Id Stage Amount TransactionNumber bnumber Table User Id Bnumber FirstName FirstLastName My aim is to select top 1 from these tables based on criteria and then update that record in the Transfer table, all in one query. I have struggled and came up with the […] General Cloud Computing Questions [Suggest cloud provider for SQL]( - I am a MERN stack developer and we need to work with SQL for a project. Can anyone suggest a good FREE cloud SQL server having low storage with which my Node backend can connect using an URI (Like Atlas for MongoDB). Our backend developer is left in the dark with this sudden and urgent […] Azure Data Factory [Data factory question]( - Upon my adventures of Azure data factory and all the wonders it can do I have stumbled upon a issue that Microsoft support has no answer as of yet. Long story short, I am trying to ingest data from a storage blob in another tenant. That customer will only allow us to connect to that […] Reporting Services [Behaviour of a link in a report in ReportViewer]( - Hi. I have an issue with a report that is about 10 years old. The report is running on an ASP.net application that is running off IIS and SQL Server 2017 on a Windows Server 2018 Server machine. The Asp.net application has a Report viewer control to view reports. There are links in the report […] SSRS 2014 [Out of memory (error code)]( - hi I have a problem. I have created a report which shows the data from table in SQL Server (just a "select * from where catid in (..)). There is a parameter where I can choose if it should show MAIN categories, OTHER categories or ALL categories - and depend on choose - the list […] [Out of memory (error code)]( - hi I have a problem. I have created a report which shows the data from table in SQL Server (just a "select * from where catid in (..)). There is a parameter where I can choose if it should show MAIN categories, OTHER categories or ALL categories - and depend on choose - the list […] SQL Server 2005 Integration Services [SSIS Connection Manager OLEDB Issue]( - Hi Team, this is first time I am posting question on forum, I am able to connect to DB using SSMS and windows authentication, however when I am trying to connect in SSIS for new OLEDB connection it seems to give me error as below. Test Connection failed because of an error in initializing provider. […] SQL Server 2022 - Development [Distance between multiple locations]( - What would be the best approach when establishing the distance between points. By that I mean I have lets say 2 fixed Building locations and 8 moving Cranes(Container lifting Crane). I have position locations every minute of the cranes, for all 8 of them. I can establish the distance with the Haversine formula in an […]   [RSS Feed]([Twitter]( 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  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

EDM Keywords (219)

would working work wonders windows well want volume voice visit varcharcol value valuable validated val2 users used use upgrade update typo typing trying try trigger tree transit today thread thought think text table sudden submitted struggling struggled string stressed stop steps started ssms ssis sqlservercentral sql sort something someone software signed shows share set sent select seen seems seeing see says running run rounding rounded round reviewed results result rest respond request report removed relevant reduce recover record reason question query python protection project process problem practiced posts post positive points point planning pieces people password participate parameter overall ought one ok occurs number notice newsletter negative need much moving month mongodb modify mistakes microsoft memory means mean many make lot look list links link limit like lesson left know kind jobid job items issue including include iis idle humans hoping help happened got good glad give getting funny forums forum format find feature fast failing excited example everyone establishing establish error enter ensure end encrypting email editorial distance depend decomposing debate dba day database data dark customer criteria creating created create cranes cope connect computer commands command coding code clicking choose checks checked charcol changing catid category categories case came calculate busy botnet article applications answer also allows aim adventures add acum action access able ability 26 24 2014

Marketing emails from sqlservercentral.com

View More
Sent On

11/11/2024

Sent On

28/10/2024

Sent On

16/10/2024

Sent On

09/10/2024

Sent On

07/10/2024

Sent On

05/10/2024

Email Content Statistics

Subscribe Now

Subject Line Length

Data shows that subject lines with 6 to 10 words generated 21 percent higher open rate.

Subscribe Now

Average in this category

Subscribe Now

Number of Words

The more words in the content, the more time the user will need to spend reading. Get straight to the point with catchy short phrases and interesting photos and graphics.

Subscribe Now

Average in this category

Subscribe Now

Number of Images

More images or large images might cause the email to load slower. Aim for a balance of words and images.

Subscribe Now

Average in this category

Subscribe Now

Time to Read

Longer reading time requires more attention and patience from users. Aim for short phrases and catchy keywords.

Subscribe Now

Average in this category

Subscribe Now

Predicted open rate

Subscribe Now

Spam Score

Spam score is determined by a large number of checks performed on the content of the email. For the best delivery results, it is advised to lower your spam score as much as possible.

Subscribe Now

Flesch reading score

Flesch reading score measures how complex a text is. The lower the score, the more difficult the text is to read. The Flesch readability score uses the average length of your sentences (measured by the number of words) and the average number of syllables per word in an equation to calculate the reading ease. Text with a very high Flesch reading ease score (about 100) is straightforward and easy to read, with short sentences and no words of more than two syllables. Usually, a reading ease score of 60-70 is considered acceptable/normal for web copy.

Subscribe Now

Technologies

What powers this email? Every email we receive is parsed to determine the sending ESP and any additional email technologies used.

Subscribe Now

Email Size (not include images)

Font Used

No. Font Name
Subscribe Now

Copyright © 2019–2025 SimilarMail.