|
|
-
|
|
This post is first of yet to come long series on basic concepts of SQL Server. I’ll begin with basic 101 introduction to SQL Server views. I wouldn’t recommend reading any further if you are an experienced sql server’er. I value your time...
|
|
-
|
|
Today I’m sharing another script that I often find useful – Queries to find the count of rows from tables and views in a SQL Server database.
Count Rows In All Tables:
This query returns the count of rows from all tables in a database. The results can be s...
|
|
-
|
|
I’m having a little fun with documenting basic information about indexes in my current project. I’m posting the scripts here mostly for me to come back when I need them in the future, but hopefully some of you might find them useful.
Find tables without an...
|
|
-
|
|
I’m having a little fun with documenting basic information about indexes in my current project. I’m posting the scripts here mostly for me to come back when I need them in the future, but hopefully some of you might find them useful.
Find tables without an...
|
|
-
|
|
I recently had a scary conversation with a user, which can be broken down to:
User: Why would the data have customers with a birth date of MM/DD/2020?
Me: What are you talking about? Lemme take a look.
Me again, this time with a changed voice: Umm, Umm, i ...
|
|
-
|
|
I recently had a scary conversation with a user, which can be broken down to:
User: Why would the data have customers with a birth date of MM/DD/2020?
Me: What are you talking about? Lemme take a look.
Me again, this time with a changed voice: Umm, Umm, i ...
|
|
-
|
|
Earlier, i discussed FIRST_VALUE() function. FIRST_VALUE() returns the first value from an ordered set of records. Similarly LAST_VALUE() returns the last value for an ordered result set, but you are in for a bit of a surprise if you aren’t familiar ...
|
|
-
|
|
Earlier, i discussed FIRST_VALUE() function. FIRST_VALUE() returns the first value from an ordered set of records. Similarly LAST_VALUE() returns the last value for an ordered result set, but you are in for a bit of a surprise if you aren’t familiar ...
|
|
-
|
|
Given a customer table:
CREATE TABLE Customers
(CustId INT, OrderDate DATE, OrderAmount MONEY) ;
INSERT Customers VALUES
(1, ’2011-12-03′, 12500)
, (1, ’2011-10-07′, 15000)
, (1, ’2011-09-12′, 16000)
, (2, ’2011...
|
|
-
|
|
Given a customer table:
CREATE TABLE Customers
(CustId INT, OrderDate DATE, OrderAmount MONEY) ;
INSERT Customers VALUES
(1, ’2011-12-03′, 12500)
, (1, ’2011-10-07′, 15000)
, (1, ’2011-09-12′, 16000)
, (2, ’2011...
|
|