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

826 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,672 reads

Blogs

Azure SQL Database – Contained user Model

By

I always follow a contained user model when setting up users within my Azure...

Logging Messages with Raiserror – #SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

Daily Coping 8 Mar 2021

By

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

Read the latest Blogs

Forums

Wait for query to finish before returning results

By oRBIT

When I do "select * from ... " from a large table, the result...

Reading a Specific File from an S3 bucket Using Python

By prashant239

Comments posted to this topic are about the item Reading a Specific File from...

Distributed SQL Databases

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Distributed SQL Databases

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers