Calculate Distance in Miles from Latitude and Longitude
A fast and accurate way to calculate the distance in miles between two points, based on the latitudes and longitudes.
2014-09-26 (first published: 2009-01-31)
9,206 reads
A fast and accurate way to calculate the distance in miles between two points, based on the latitudes and longitudes.
2014-09-26 (first published: 2009-01-31)
9,206 reads
2014-09-25 (first published: 2010-12-23)
25,952 reads
2014-09-23 (first published: 2010-02-17)
11,475 reads
This script will allow you get all the users and roles with permission on objects on all databases.
2014-09-18 (first published: 2009-03-05)
35,657 reads
Populate a calendar table with user set interval start and end datetime values.
2014-09-16 (first published: 2014-02-21)
2,085 reads
Populate a calendar table with user set interval start and end datetime values.
2014-09-15 (first published: 2014-02-21)
1,995 reads
2014-09-12 (first published: 2011-12-22)
3,310 reads
Transpose N rows of a table (v2.0 allows user to specify the table's schema)
2014-09-10 (first published: 2010-01-29)
2,035 reads
Create crosstab queries as easily as MS Access with a lot more power.
2014-09-09 (first published: 2009-04-02)
4,466 reads
An inline table-valued function (iTVF) that will produce a virtual tally table on-the-fly. The function creates a tally table of any size with user-defined lower and upper bounds.
2014-09-08 (first published: 2013-06-28)
2,247 reads
Good documentation gets you started. Good books get you deep. After years of working...
By Vinay Thakur
In previous posts, we looked at the SQL Server engine. for us DBAs, the...
By Arun Sirpal
You have used Claude. But which Claude? The Claude app (claude.ai, the desktop and...
Comments posted to this topic are about the item Creating a JSON Document IV
By VishnuGupthanSQLPowershellDBA
Comments posted to this topic are about the item Restoring Azure Key Vault Keys...
When the schema of an object is changed, SQL Server wipes out the previous...
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT YearEstablished, json_objectagg(city : TeamName) FROM dbo.NFLTeams GROUP BY YearEstablished;See possible answers