Function to Return the Amount of Children in a Tree

Assuming we have the following table (that stores hierarchical data)  :CREATE TABLE [staff] (    [employee] [int] NOT NULL ,    [employee_name] [varchar] (10) NULL ,    [supervisor] [int] NULL ,     PRIMARY KEY  CLUSTERED     (        [employee]    )  ON [PRIMARY] ,     FOREIGN KEY     (        [supervisor]    ) REFERENCES [staff] (        [employee]    ))I ‘ll built a […]

2002-08-23

827 reads

Alert When Not Enough Free Disk Space

--Implement an Alert Which Trigger when Specified Disks--free space exceeds a specified alert level--Steps to implement:--1) Define a Custom Error Message with messsage text (The ---drive free space is bellow alert level. Details: %s)--2) Define an Alert linked to CEM defined at step 1--3) Implement a Job which execute the following step in a recurring […]

2002-06-04

2,678 reads

Blogs

How to Design Backups in SQL Server?

By

The Recovery Point Objective (RPO) and Recovery Time Objective (RTO) are basic concepts related...

Daily Coping 23 Sept 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Getting Up and Running with Dapr

By

I’ve heard about Dapr a few times from developer friends, but hadn’t really understood...

Read the latest Blogs

Forums

The OPENJSON return schema

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The OPENJSON return schema

Thank a Mentor

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Thank a Mentor

Create an RPA Flow that Connects to Oracle Data in UiPath Studio

By JerodJ

Comments posted to this topic are about the item Create an RPA Flow that...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers