September 20, 2008 at 6:29 pm
Hi,
I'm using SQL 2k.
I use to work with grid results pane most of the time, but for very few scripts I need to see them as text.
Is there any way in TSQL to force specific view in result pane?
Thanks
September 20, 2008 at 7:34 pm
I could be wrong, but I'm pretty sure there's no way to do it via T-SQL.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2008 at 7:53 pm
mmm... that's a missing.
Do you know if there is any way to do a "sendkey" via TSQL?
September 20, 2008 at 10:03 pm
Good idea about the "sendkey"... but not sure how you would do it because the "scope" of QA changes when you hit the run button. All output is directed to the results pane instead of back to QA. Even if you wrote a small .exe using something like VB, I don't believe it would work because of the scope change.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2008 at 10:18 pm
About the only way I can think of to do this is to use PRINT to create the output if it needs to be in a Text results pain. It'll show up in the "Messages" tab.
The other way to do is is to put a comment in at the beginning of the script to remind you.
Or, if it's supposed to be Text instead of a Grid, you could always output it to a file.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2008 at 10:42 pm
mmm...
I'm thinking in something like HotKeys or so.
I don't know if HotKeys can respond to a certain text or situation into a specific window.
I know I can fire any event I need with a key but I don't now how to do the opposite.
Do you?
September 20, 2008 at 11:07 pm
Maybe a registry entry...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2008 at 12:50 am
Thanx Jeff, but not good news:
This key handles default for results pane: 0=Text, 1=Grid
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\SQL Query Analyzer\Options\ResultsTab\DefResultsTarget
Apparently it works only as a startup default...
Options dialog effectively changes that value.
But if I don't open Options dialog, results panel view remains the same, without using modified value.
September 22, 2008 at 5:16 am
am i totally missing something here, but if running queries in QA surely:
ctrl T, ctrl E - results in text
ctrl D,ctrl E - results in grid
:ermm:
---------------------------------------------------------------------
September 22, 2008 at 8:17 am
It's official!
I give up and decided to go "FuNctional" with HotKeys 🙂
F2 = save
F3 (= search again)
F4 = open in same window
F5 = exec with grid
F6 = show/hide results pane
F7 = exec with text view
F9 = new windows
(Anyway, this is for 2k.. maybe 2k5 or 2k8 allows a different approach)
Thank you all.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply