Date and Time Calculations Made Easy with EOMONTH, DATEDIFF, and DATEADD
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
I preface a lot of what I write with whether or not it is for a “practical” use. One of the Simple Talk authors used this function in a forthcoming article. and I realized I hadn’t heard of it before (or I forgot about it… which is not completely unlikely.) The practical use was to generate some data and have at least a little variety to the values.
Steve looks at a trial using Microsoft's Copilot and how helpful it was for workers.
I know SQL cursors exist, but I am not sure how or why to use them. Can you provide a SQL cursor example? Can you give any guidance on when to use a SQL Server cursor?
People with certifications are seeing their pay rise faster than others. Steve has a few thoughts on this today.
No, that isn’t an April 1st joke, heh. I know a lot of vendors are shoving AI down your throat, but I can think of a few ways I actually want to get quick, easy advice from large language models (LLM) when I’m calling the sp_Blitz scripts:
I've taken part in online forums since... hoo boy, I was using a dial up modem and had to constantly remind my wife not to pick up the phone while I was using the computer. Man I'm old. Anyway... I've asked a lot of questions over the years, and I've tried to answer them as […]
With the ubiquity of real-time data, organizations need streaming systems that are scalable, easy to use, and easy to integrate into business applications. Structured Streaming is a new high-level streaming API in Apache Spark based on my experience with Spark Streaming. In this article, we show structured streaming data written into Spark Tables and consumed by reporting Analytic for reporting needs.
In a previous topic we discussed how to pass parameters into a stored procedure, but another option is to pass parameter values back out from a stored procedure. One option for this may be that you call another stored procedure that does not return any data, but returns parameter values to be used by the calling stored procedure.
PlanTrace: Stop Reading Redshift EXPLAIN Plans. Start Seeing Them Introducing PlanTrace — a free, browser-based...
By Steve Jones
I went to sleep while reading a Kindle book on my phone. I know...
A conversation with Jan Laš, CIO at HOPI, about what deploying a data agent...
We suffered a SPAM attack from May 1-6, which unfortunately corresponded with time off...
Hi to all We have situation at a client where someone is illegally changing...
Hi to all We have situation at a client where someone is illegally changing...
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 TOP 2
json_objectagg('Team' : TeamName)
FROM dbo.NFLTeams;
See possible answers