T-SQL

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 […]

5 (4)

2020-02-04

7,072 reads

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 […]

4.67 (9)

2019-12-10

9,027 reads

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. 

2019-11-24

308 reads

Blogs

Daily Coping 21 Sep 2020

By

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

Daily Coping 18 Sep 2020

By

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

Optimize for Unknown for Inline Table-Valued Functions

By

I had a curious performance issue today. An inline table-valued function (iTVF) was performing...

Read the latest Blogs

Forums

DEA

By ramyours2003

What is the use of DEA tool in sql ?  how can we  install...

\'REMOTE ACCESS\' setting flipped back to 0 overnight ??

By Express12

Any reason why our SQL Server 2016 Standard edition instance would have flipped the...

SSIS 2019 - Conditional Expression for the value of a variable- fails evaluation

By sgmunson

Hi All, Ran into an error trying to evaluate the following expression for a...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers