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
 Transact-SQL (2000)
 displaying results of simple query horizontal

Author  Topic 

cirugio
Yak Posting Veteran

90 Posts

Posted - 2013-10-16 : 12:51:21
I am trying to display the following output from this simple query which writes to a file to display the output horizontally instead of vertically. Is this doable? Below is my query and the current results along with an example of how I would like for it to be displayed. Hoping someone can help. thanks for your time in advance.

Query which writes to a file:
Print 'Report AsofDate:'
select top 1 convert(varchar,asof_dt,101) from sbc_bdi_db.dbo.Temp999


Results from above query Are:

Report AsofDate:
----------------
05/31/2013


I would like to results to look like this instead:

Report AsofDate: 05/31/2013

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-10-16 : 13:42:48
select top 1 'Report AsofDate: ' + convert(varchar,asof_dt,101) from sbc_bdi_db.dbo.Temp999

depending on how you are writing this out to a file you can exclude the header. How ARE you writing it out to file?

Be One with the Optimizer
TG
Go to Top of Page

cirugio
Yak Posting Veteran

90 Posts

Posted - 2013-10-16 : 14:40:15
THANK YOU TG!!!! This worked out perfectly.
Have a great day!
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-10-16 : 14:47:43
You're welcome - and thanks, you too!

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -