In most cases stored procedures are developed so that it accepts a number of input parameters … Table Valued Parameters in Stored ProceduresRead more
T-SQL
NULL and aggregates
An aggregate in SQL Server will ignore NULL values. Check out this simple demonstration to learn … NULL and aggregatesRead more
Add and edit Windows environment variables
Windows environment variables are a great way to store server specific information that may be accessed … Add and edit Windows environment variablesRead more
sp_describe_first_result_set
The system stored procedure sp_describe_first_result_set was introduced in SQL Server 2012 and it returns meta data … sp_describe_first_result_setRead more
Bollinger Bands in T-SQL
Bollinger Bands® is a technical analysis tool trademarked by its inventor, John Bollinger. The basis for … Bollinger Bands in T-SQLRead more
Relative Strength Index RSI in T-SQL
The relative strength index (RSI) is a calculation in TA (Technical Analysis) which measures the strength … Relative Strength Index RSI in T-SQLRead more
MACD in T-SQL
The MACD (Moving Average Converenge Divergence) is a calculation in technical analysis used as a indicator … MACD in T-SQLRead more
Exponential moving average in T-SQL
Exponential moving averages are similar to weighted moving averages in that they assign less weight to … Exponential moving average in T-SQLRead more
Large Inserts and count(*)
If you insert lots of rows into a table with a clustered index, a SELECT COUNT(*) … Large Inserts and count(*)Read more
Line numbers in t-sql error messages
When you run scripts in SSMS and get an error, the error references a line number … Line numbers in t-sql error messagesRead more