I am using SQL Server 2008 R2 (10.50.4000). When I start typing the IntelliSense pops up and offers tables/columns. When I press tab to select and start typing further the IntelliSense adds characters. It is difficult to explain so hopefully the following screens will help:
I start typing:
I press TAB to select the table:
I press enter to go to next line to add my WHERE clause:
Has anyone seen anything like this before and if so can you please help.
Thanks
As suggested in the responses this was to do with RedGate SQL Prompt. I turned it off and everything works fine now. I am unsure why it only affects certain versions of SQL though.
Thanks all
Related
The R language has this nice feature where you can re-run the same lines of code with CTRL+Shift+P. Does anyone know if that's possible with SQL Server Management Studio (SSMS)?
I find myself modify a bit of code and wanting to run it again, quickly. The highlight and execute is getting a bit repetitive. I would like a shortcut to run the same lines without the need to highlight.
Press F5 or Ctrl+E in SSMS. Both of these will run the highlighted SQL.
Hovering over the Execute button will have also displayed a tooltip to tell you this.
Update: Would like something that everyone can use, not just admin.
I tried to find if this question has already been asked before this post. In SSMS 2014, is there an option to only allow query execution if any text has been selected?
If none is selected, F5 and/or the execution button should be disabled. Thank you!
Based on my brief research, if user (like myself) who cannot run RAISERROR with severity level 20 or above, I am using SET NOEXEC ON and SET NOEXEC OFF in the very top and bottom. Then develop your script inbetween those two statements.
The downside is that there are two statements to add at 2 different locations. Also, if your script requires the use of SET NOEXEC, then this might not work.
I have this snippet that I sometimes include at the top of my queries:
raiserror('Highlight something and tell me what you''d like to do.', 20, -1) with log
Per the Microsoft Connect page titled, Add an Execute Selected Text Only to SQL Server Management Studio:
...We are considering adding this as a text-editor option for an
upcoming release. I have no way to mark it as "added to backlog", so
I'm resolving it as "Won't Fix". It's there though...
Cheers
-Sam Hughes
That was in 2011. If there is a way to do this I suspect it would be using Redgate. I'm not a redgate guru but I know that, for example, SQL Prompt will throw a warning before letting you do a DELETE or UPDATE without a WHERE clause. That's where I'd start.
Let's have simple
SELECT 'a'
Whenever I press F1 on SELECT keyword, standalone installed SSMS 2016 launches web browser to display online help.
I want F1 to open local help for SELECT keyword.
What I have done so far:
Menu Help > Add or Remove Help Content, added books SQL Shared Language reference, Books Online, Developer Reference so help page for SELECT (Transact-SQL) is now available in help index.
Migrated help repository from C: to some more convenient place.
What else needs to be done?
Maybe checking option "I want to use local help" in help settings? But it is not present any more in SSMS 2016.
I also examined the Registry and was hunting for proper registry key(s) listening to SSMS using Process Monitor tool, but the SSMS did not seem to read anything resembling online/offline option at the moment of pressing F1.
If you think that the above steps to enable local help should be enough, consider upvoting subsequent bug report at the Microsoft.
SSMS 2016 help is broken. See these connect items, which you can vote for:
https://connect.microsoft.com/SQLServer/feedback/details/2826366/f1-help-in-ssms-2016-always-opens-online-content-ignores-local-help-library
and
https://connect.microsoft.com/SQLServer/feedback/details/2828609/ssms-2016-help-viewer-1-1-pops-up-help-docs-never-found
UPDATE:
the issue came fixed in SSMS 2016.4.1. From download page:
Fixed an issue where the F1 Help always opened online content. Users can now select whether they prefer online or offline help via the "Set Help Preference" in the Help menu.
Microsoft Connect item #2826366
Sometimes I miss the 1 or the F2 in my computer keyboard when using SQL Server Maganement Studio, that causes my SQL MS to hang and the I have to close it with the Task Manager, but many time I loss a lot from the queries I was working on, so I would like to fix this problem,
Maybe someone here has the same problem.
Microsoft Document Explorer
The Application Data folder for Microsoft Document Explorer could not be created
Right click on the SSMS program (in the start menu / desktop) and select "run as administrator". Do whatever you do to cause SSMS to hang, quit and re-run as normal user. This should remove that warning.
After many intents to solve this problem, I received this message:
External help is not available because Microsoft Document Explorer is
not installed. To view help, change your Help preferences to use the
Integrated Help Viewer or Install Microsoft Document Explorer
I tried to do it at Tools->Options->Help->General->
Show Help usaing: Integrated Help Viewer
Search Result per page: 20
Show Topic abstracts: checked
Reuse Topic window: checked
Highlight search termn: checked
I had to tried many times until SSMS wanted let me to do it.
Now the problem has been partially solved, when I press F1 the SSMS does not hang, but when I still try to change something in the help options, then chunks..
The format selection command isn't working in SQL server management studio 2008 for me and I'm wondering if anyone might know how to get it working. I don't know if it was ever working.
Do you have any add-ins installed? For me Ctrl+K, Ctrl+F brings up the SSMS Tools Pack find dialog. So perhaps this is happening because an add-in has taken over the keyboard combo.
Also, what is your keyboard scheme under Tools > Options > Environment > Keyboard? If this has been switched to "SQL Server 2000" you might try switching it back to Standard.
Finally, I believe there are cases where the keyboard shortcuts can get messed up depending on the co-existence and order of install for Visual Studio / BIDS etc.
IN SQL SERVER 2014
First do: Ctrl +K
Then: Ctrl+ Y
I know this post is really old, but for people searching for answers to this question I have this to add:
The Ctrl+K, Ctrl+F key combination for format code comes from poorsql.com. They have a SSMS/Visual Studio plugin. As of this date they currently support up to SSMS 2017.
This feature isn't available on SQL Server Management Studio.
There are various add-on's you can use to do this. I personally use ApexSQL. It gives you the option to create your own format template, so that your code is always easily readable for you.
Check this link:
http://www.mssqltips.com/sqlservertip/2413/sql-server-management-studio-keyboard-shortcuts-part-1-of-2/
...You can select specific lines and hit CTRL+K
followed by CTRL+C to comment it out and
CTRL+K followed by CTRL+U
to uncomment it out...