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.
| Author |
Topic |
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2005-02-02 : 05:05:07
|
| MorningI am writing a query as a stored proc and I want to know if there is a command for displaying the results in text format, as opposed to selecting the option in Query Analyzer?ThanksHearty head pats |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-02-02 : 05:22:43
|
| Try ctrl + TThat changes the output in QAAndy |
 |
|
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2005-02-02 : 06:33:26
|
| Hi Andy, thanks for the advice. The thing is, even if I change the output format in QA, as soon as I run the stored proc, it changes back to grid format. I would create the query as a view, but I need to use the 'compute' function, which is not supported in views.The reason I am writing it as a stored proc is to make the process as simple as poss, so anyone without any required skills can run the query. Also, it makes locating the query easier as you simply select the sp from the object browser. So I was wondering if there was SQL Syntax which determines the query output format, so i could include this in the stored proc, without the user needing to do anything except run the sp????Hearty head pats |
 |
|
|
AndyB13
Aged Yak Warrior
583 Posts |
Posted - 2005-02-02 : 07:19:40
|
| So let me get this straight you are using QA as a reporting tool?You can set QA defaults in tools > options > results tab and set the default results target to text, that way ALL queries will be output to textAndy |
 |
|
|
Bex
Aged Yak Warrior
580 Posts |
Posted - 2005-02-02 : 07:52:03
|
Hi AndyThanks again for your advice. Although that is good for me, for someone running QA from their machine, they will have different settings. So although this would work if they came to my workstation, I was hoping for perhaps a solution across board, that would require no effort on the users part (simply open up QA, open and run the sp, save the results). You know what, it is most likely that I will be running the queries, or I can show others what to do. My approach is always geared towards 'idiots guide' (I don't want to sound offensive, I just like to think that anyone could come and operate the query without needing to know the software). It isn't really necessary in this scenario, but I was just interested to see if there was a command to control output format. Thanks all the same!!! Hearty head pats |
 |
|
|
|
|
|
|
|