stevegray
4Penny.net
Points: 60959

3/10/2026 1:54:44 PM

Query that adds a blank line to the result set if the original resultset has more than one line

* This article, and all our great SQL (General) documentation, Is available on the SQL (General) menu

When you’re shaping a SQL result set for reporting or exporting, sometimes the smallest formatting detail—like inserting a single blank row—can make the biggest difference. But doing it conditionally, only when the dataset contains more than one row, isn’t immediately obvious. In this article, we’ll walk through a clean, reusable pattern that lets you append a blank line only when it’s needed, without rerunning your base query or cluttering your logic.

4Penny.net
Version: All
Section: SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3