Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Blank Line in Output

Status
Not open for further replies.

charbrad

Technical User
Nov 7, 2002
132
US
I am trying to insert a blank line between categories. My output is:

Code:
Shoes  12
Shoes  11
Shoes  10
Shoes  09
Socks  19
Socks  11
Socks  17
Socks  22
Boots  19
Boots  25
Boots  76

What I am trying to get is each category with a blank line in between like:
Code:
Shoes  12
Shoes  11
Shoes  10
Shoes  09

Socks  19
Socks  11
Socks  17
Socks  22

Boots  19
Boots  25
Boots  76

Can someone help me out?
 
i have assumed that the Table name is ProductTable, the columns are Product and Price (tinyint).

query:
SELECT CASE WHEN Price IS NULL THEN '' ELSE Product END Product, isnull(cast(Price as varchar), '')
FROM (SELECT *
FROM ProductTable
GROUP BY Product, Price WITH rollup) DTable



Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top