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,668 reads

Blogs

Goal Progress–November 2020

By

This is my report, which continues on from the Oct report. It’s getting near...

Azure Synapse Analytics is GA!

By

(Note: I will give a demo on Azure Synapse Analytics this Saturday Dec 5th...

5 Things You Should Know About Azure SQL

By

Azure SQL offers up a world of benefits that can be captured by consumers...

Read the latest Blogs

Forums

Get data from last line and merge into data stream before removing

By Bruin

This script reads thru a file and removes the last line, but before it...

Firewall access for Availability Group listeners

By webrunner

Hello experts, I have a noob question as I never feel like I understand...

conversion of excel formula to case statement in tsql

By Abhas

Hi  all, need your help on conversion of excel formula into case statement. i...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers