SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 displaying results of simple query horizontal
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cirugio
Yak Posting Veteran

90 Posts

Posted - 10/16/2013 :  12:51:21  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 10/16/2013 :  13:42:48  Show Profile  Reply with Quote
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 - 10/16/2013 :  14:40:15  Show Profile  Reply with Quote
THANK YOU TG!!!! This worked out perfectly.
Have a great day!
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6059 Posts

Posted - 10/16/2013 :  14:47:43  Show Profile  Reply with Quote
You're welcome - and thanks, you too!

Be One with the Optimizer
TG
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000