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

825 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,661 reads

Blogs

Social: Going Along to Get Along

By

It’s the eve of the Fourth of July, when the Declaration of Independence is...

Daily Coping 3 Jul 2020

By

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

Using Docker Volumes for SQL Server in Linux

By

No, not that kind of volume! Over the past couple of blog posts, I...

Read the latest Blogs

Forums

stored procedure to delete user and login

By SZ

I was trying these but it does not work: USE [MyDatabase] GO /****** Object:...

Managing Stress

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Managing Stress

Failover Cluster Instance Share

By Mike Scalise

Hi, I am using AlwaysOn Availability Groups in SQL Server 2016 with a primary...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers