Management Studio, shortcut for False/True editing the results pane - sqlserver-tools
This is a discussion on Management Studio, shortcut for False/True editing the results pane - sqlserver-tools ; Hi, we just upgraded to SQL Server 2005 and I have a minor issue hand- editing data in SQL Server Management Studio object query results as I'm accustomed to in Enterprise Manger. That is that the new interface (which also ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| editing data in SQL Server Management Studio object query results as I'm accustomed to in Enterprise Manger. That is that the new interface (which also allows an initial arbitrary query only in "New View", not off a table) apparently obliges me to type "True" or "False" to set a Boolean column. Used to be 0 and 1. I'd've written one that accepts 0, 1, T, F, Y, and N as operator input, but noooo. Still present but not documented(?) is the option to set NULL by keyboard Ctrl Zero. You also can type the word "NULL" in caps to make NULL. This implies that you can't use this interface to store the word "NULL" on its own, but how often do you do that anyway... only as a practical joke on another database administrator :-) I have a keyboard issue so "True" and "False" is really bugging me, is there an alternative? I could press buttons randomly to find a shortcut but would you do that?? So , please? I do have ideas: (1) Speech recognition, or (2) Toolbar buttons to launch an external program that types the word "True" or "False" into the application. I have such a program - "AutoHotkey", free download. Its main act in fact is to hang around and substitute text that you type, and it can be context-sensitive, but that can be fiddly to set up if I want say to make ^ and & type true/false only when appropriate. On the other hand, I could make it one button that runs a program that toggles true-false, probably...and can I have shortcut keys for toolbar buttons? |
|
#2
| |||
| |||
|
I will agree that this is very annoying and has been a relatively warm topic since SQL Server 2005 was first put into beta. Unfortunately it still works that way in the SQL Server 2008 tools and there isn't much indication that they're going to fix in in the version after that either (they don't seem to think anything is broken). http://connect.microsoft.com/SQL/fee...edbackID=12458 4 http://connect.microsoft.com/SQL/fee...edbackID=33029 3 http://connect.microsoft.com/SQL/fee...edbackID=26459 2 You have some crafty workaround but they seem very cumbersome to me. I don't really approve of open table for editing data anyway; maybe you could make an Access project with linked tables and edit the data there, or write a quick web or win form front end that translates 0 and 1 correctly, or simply use proper DML (INSERT/UPDATE) statements in a query window. On 11/10/08 10:46 AM, in article 6a145cac-1ada-4bba-8f09-28e414e8adfc...oglegroups.com, "Robert Carnegie" > Hi, we just upgraded to SQL Server 2005 and I have a minor issue hand- > editing data in SQL Server Management Studio object query results as > I'm accustomed to in Enterprise Manger. That is that the new > interface (which also allows an initial arbitrary query only in "New > View", not off a table) apparently obliges me to type "True" or > "False" to set a Boolean column. Used to be 0 and 1. I'd've written > one that accepts 0, 1, T, F, Y, and N as operator input, but noooo. > > Still present but not documented(?) is the option to set NULL by > keyboard Ctrl Zero. You also can type the word "NULL" in caps to make > NULL. This implies that you can't use this interface to store the > word "NULL" on its own, but how often do you do that anyway... only as > a practical joke on another database administrator :-) > > I have a keyboard issue so "True" and "False" is really bugging me, is > there an alternative? I could press buttons randomly to find a > shortcut but would you do that?? > > So , please? > > I do have ideas: > > (1) Speech recognition, or > > (2) Toolbar buttons to launch an external program that types the word > "True" or "False" into the application. I have such a program - > "AutoHotkey", free download. Its main act in fact is to hang around > and substitute text that you type, and it can be context-sensitive, > but that can be fiddly to set up if I want say to make ^ and & type > true/false only when appropriate. On the other hand, I could make it > one button that runs a program that toggles true-false, probably...and > can I have shortcut keys for toolbar buttons? |
|
#3
| |||
| |||
|
On Nov 10, 5:01*pm, Aaron Bertrand > I will agree that this is very annoying and has been a relatively warm topic > since SQL Server 2005 was first put into beta. *Unfortunately it still works > that way in the SQL Server 2008 tools and there isn't much indication that > they're going to fix in in the version after that either (they don't seemto > think anything is broken). > > http://connect.microsoft.com/SQL/fee...aspx?FeedbackI... > 4 > > http://connect.microsoft.com/SQL/fee...aspx?FeedbackI... > 3 > > http://connect.microsoft.com/SQL/fee...aspx?FeedbackI... > 2 > > You have some crafty workaround but they seem very cumbersome to me. *I > don't really approve of open table for editing data anyway; maybe you could > make an Access project with linked tables and edit the data there, or write > a quick web or win form front end that translates 0 and 1 correctly, or > simply use proper DML (INSERT/UPDATE) statements in a query window. Which is not cumbersome at all... I respect your opinion, but the tool is there to be used, what's wrong with that? ;-) (I suspect you can answer extensively...) Actually, since apparently I have to solve this myself (which is what I wanted to know), the external macro scripting tool isn't cumbersome in relation to its power. But there's a catch I don't know how to get around or switch off (please?), with putting it on the toolbar as an external command or external tool: apparently, running an external tool prompts Management Studio to save the contents of other project / query windows, which is likely to be not what I want to have happen, because of certain script habits. (See this for instance if you set up Notepad.exe as an external tool.) Well, one answer to that is to launch my thing from outside Management Studio, for instance in the Windows XP Quick Launch toolbar next to the Start menu. Another is to program it the way that AutoHotkey is designed to be used, waiting for you to type a special key sequence or some other trigger (say ttt and fff). I feel it's untidy to keep a script loaded all the time in /case/ I want it, but I don't want to be perverse. (But I have two going already...) And my Quick Launch already is too well stocked for the name to be strictly accurate ;-) Here's the slightly fancy effort: a script in AutoHotkey language that saves clipboard, then copies the current cell, then changes the copy to "True" unless it /was/ "True", in which case "False", then pastes it back. So you run the same program to change NULL or False to True, and to change True to False. AutoHotkey makes it quite easy to do sneaky stuff like this, if you can dig the freaky syntax. I believe it was written by gam3rz. ;-) ; Saved as TrueFalse.ahk ; Copy the current cell in Management Studio Results, toggle True/ False ; Store previous clipboard contents ; ClipSaved := ClipboardAll Clipboard := ; select current field and copy to clipboard ; Send, ^a^c ClipWait ; until not empty ; If content is the word "True" then make "False" else make "True" ; IfEqual, Clipboard, True ; the word "True", not case sensitive { Clipboard = False } Else { Clipboard = True } ; Paste ; Send, ^v ; Restore previous clipboard ; Clipboard := ClipSaved ClipSaved = |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 03:13 PM.




Linear Mode