T-SQL

SQLServerCentral Article

Calculate Moving Averages using T-SQL in SQL Server

  • Article

Introduction In Financial Data, analyzing the Moving Average (MA) is a very common practice. The direction of the moving average conveys important information about prices, whether that average is simple or exponential. A rising moving average shows that prices are generally increasing. A falling moving average indicates that prices, on average, are falling. This article […]

(4)

You rated this post out of 5. Change rating

2020-02-04

23,066 reads

Technical Article

T-SQL script to purge all the tables including foreign key references

  • Script

T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and to use DELETE wherever there is foreign key reference.

(3)

You rated this post out of 5. Change rating

2019-12-10

2,599 reads

SQLServerCentral Article

SQL Server Name Convention and T-SQL Programming Style

  • Article

There are only two hard things in Computer Science: cache invalidation and naming things -- Phil Karlton The recommendations in this article are not the ultimate truth. Please consider this article as a rule template that you can adapt to your needs. A naming convention is a set of rules for choosing the character sequence to […]

(10)

You rated this post out of 5. Change rating

2019-12-10

25,177 reads

Technical Article

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Script

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

You rated this post out of 5. Change rating

2019-11-25 (first published: )

796 reads

Technical Article

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

  • Script

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

You rated this post out of 5. Change rating

2019-11-12 (first published: )

2,071 reads

Blogs

AI: Blog a Day – Day 6: Embeddings – How AI Understands

By

Continuing from Day 5 where we covered notebooks, HuggingFace and fine tuning AI now...

The Book of Redgate: Mistakes

By

This is kind of a funny page to look at. The next page has...

ADF Pipeline Debugging Fails with BadRequest – The Sequel

By

A while ago I blogged about a use case where a pipeline fails during...

Read the latest Blogs

Forums

Dynamic Unpivot

By pietlinden

I have a table I didn't design that has tons of repeating groups in...

Writing as an Art and a Job

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Writing as an Art and...

String Similarity II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item String Similarity II

Visit the forum

Question of the Day

String Similarity II

What is the range for the result from the EDIT_DISTANCE_SIMILARITY() function in SQL Server 2025?

See possible answers