Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Insert Blank Line

Author  Topic 

TallOne
Starting Member

49 Posts

Posted - 2005-11-22 : 10:53:28
Hi,

I want to perfporm a select query and on the 11th row of the recordset I would like a blank row added. Is this possible?

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2005-11-22 : 15:32:56
Is there are a reason that you want the 11'th row specifically blank?
Go to Top of Page

TallOne
Starting Member

49 Posts

Posted - 2005-11-22 : 16:57:05
Actually code for any row blank would work.
Go to Top of Page

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2005-11-22 : 18:11:56
One way I can think of is:

select '' as Field_1_Name -- Where Field_1_Name represents your first field name
UNION ALL
select your stuff

* You might need to have the first line return '' for each field you return in your results. Or you could reverse it and then I think you would only need the one '' if it was the last line. (Not at a computer to test right now, but I thought this might get you started.)
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-23 : 00:01:08
Where do you want to show the data?
If you use Front End Application, Just write Select query and use Loop and insert a blank line at 11th line

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

TallOne
Starting Member

49 Posts

Posted - 2005-11-23 : 08:18:06
Thank both of you very much! The union worked a treat!

Cheers
Go to Top of Page
   

- Advertisement -