External Article

Work Around Errors in Database Web Apps

ne of the issues you face when building Web applications is handling the errors you encounter when interacting with a back-end database. I was recently working with someone to create a new Web site with SQL Server™, ActiveX® Data Objects (ADO), and ASP. Lots of little things came up that I thought were worth sharing with MIND readers, so I'll focus this column on what I learned from this experience and the solutions to many of the problems I faced.

Technical Article

Quarter of a Century Competition on P2P

P2P, the programmer's resource centre from Wrox Press, reached a milestone of 25,000 subscribers this week. To celebrate this fact, Wrox are giving away $1000 worth of books and ASPToday subscriptions in a free prize draw. For more details on how to enter, please visit: http://p2p.wrox.com/25k.asp. The draw will be made on July 16th.

Blogs

SQL Data Pipelines: The Ultimate Guide to Streamlining Your Data Flow

By

Want to build a data analytics foundation that transforms raw data into valuable business...

Using SQL Compare in Read-Only Databases

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

T-SQL Tuesday #179 Roundup: The Data Detective Toolkit

By

Earlier this month, I hosted the monthly T-SQL Tuesday invitation in which I asked,...

Read the latest Blogs

Forums

Concatenating Multiple Row Values into a Single Comma-Separated List

By Sukhdevsinh Dhummad

Comments posted to this topic are about the item Concatenating Multiple Row Values into...

From each string extract Numbers following a '#' and create separate row

By SqlRookie

Hi there, I've tried CROSS APPLY, PATINDEX and many other functions, but can't nail...

Looping SQL Agent Job

By paul.farnell

What is the best way to continually loop a SQL Server Agent Job? I...

Visit the forum

Question of the Day

The LAGing data

I have some simple sales data in a SQL Server 2022 database that looks like this:

TransactionDate SalesAmount
2023-01-15      1200.00
2023-02-22      1500.50
2023-03-10      900.75
If I run this query, what are the sales growth amounts returned?
SELECT
  ms.TransactionDate
, ms.SalesAmount
, ms.SalesAmount - LAG (ms.SalesAmount, 1) OVER (ORDER BY ms.TransactionDate) AS SalesGrowth
FROM dbo.MonthlySales AS ms;

See possible answers