Use CROSS APPLY and OUTER APPLY for per-row functions, reusable expressions, VALUES unpivoting, DMV text, plans, and latest rows.
SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.
Choosing Hardware for SQL Server Now
Choosing hardware for SQL Server Now means matching core cost, memory, and storage latency to measured workload needs and future growth.
geometry STArea: Measure the Polygon Interior
geometry STArea measures polygon interior rather than its outline. These local planar shapes show equal areas with different perimeters, a hole subtraction and zero-area instances.
Enable SQLCMD Mode in SSMS: SQL in Sixty Seconds #048
To enable SQLCMD mode in SSMS, use the Query menu or set it as the default for new windows. This post tests :connect, :setvar, :r, !! and :on error exit with sqlcmd.exe on SQL Server 2025 and shows the Msg 102 error you get when the mode is off.
SQL SERVER – Fix : Error: 257 Implicit conversion from data type datetime to int is not allowed.
Implicit conversion from data type datetime to int is not allowed. I hit this error with ISNULL and a date, and the fix is right in the message: use CONVERT.
SQL SERVER – The procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
Why does SQL Server say a procedure attempted to return a status of NULL and returns 0 instead? A reader asked on Facebook, and I explain what it means.
How to Pass Stored Procedure Result to Another Procedure in SQL Server
To pass stored procedure result values from one procedure to another, use an OUTPUT parameter. This post tests RETURN codes, INSERT … EXEC and table-valued parameters on a small order demo. It also shows the errors each method raises and when a function is the better tool.
SQL Server slow? Let's fix it together in about four hours.
In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.
You keep every script, and the know-how to fix it yourself next time.
Want your whole team to learn it?
My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.
Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.
Who We Are
Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.
Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.
Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).
Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.
Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

