How to find a plus sign in a query window of SQL Server Management Studio? - sql-server

I am using Quick Find (Ctrl + F) in a query window of SQL Server Management Studio to find a plus sign. But the text box gets red border and a blue progress indicator running on the bottom.
It works instantly to find other characters. Only the plus sign is problematic.
I am using SQL Server Management Studio 15.0.18358.0.

It is enough to disable the option Use Regular Expressions (Alt + E).

Related

How to show the number of rows of the result in SQL Server Management Studio?

In my SQL Server Management Studio the number of rows of the result in the bottom bar has disappeared. In the image attached is the red circle
I have been looking for the configuration of the bar but I haven't found it. How can I show it again?
Thanks
You can do it by modifying Options

SQL Server Management Studio keyboard shortcut to highlighted Line Up and Down

What is the shortcut of the highlighted Line Up and Down. Like in the Visual studio.
I have SSMS 2014 and didnt find. Althought lad2025 said 2017 have this option in Advance
It is:
Alt + Up Arrow for Move Selected Lines Up
Alt + Down Arrow for Move Selected Lines Down
SSMS -> Edit -> Advanced:
If it is not available I would recommend to upgrade SSMS to newest version.

CTRL + K, CTRL + F (Format Code) Not Working in MS SQL Server

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...

How can I execute a single query in SQL Server Management Studio?

Background: I'm using SQL Server Management Studio 2008 and I have a query window open that contains multiple queries.
Is there a keyboard shortcut that will allow me to execute a single query without highlighting the query I would like to run first? Some other SQL tools have shorcuts that run the query that is under the cursor, which keeps the hands on the keyboard, and away from the mouse.
I did some searching and was unable to find any keyboard shortcuts for executing individual lines in SSMS. There is a reference online though.
http://msdn.microsoft.com/en-us/library/ms174205.aspx
Personally I just highlight the row in question (Shift + End or Shift + ↓, etc.) and hit F5.
Ctrl + E works just as well on a Mac.
The usual Shift + Arrow or Shift + PgUp / PgDown that apply to most or all Windows apps...
Then I use Ctrl + E to execute
Highlight the query you want to run, then F5.
Since this was originally asked, DevArt has added this functionality to their SSMS add-on . After installation, press Ctrl-Shift-E to execute the statement block under the cursor.
This isn't exactly what the OP was after, but here are two related tips that might help:
SSMS 2008 had a handy feature where you can double click the left margin (where the line numbers are) and it will auto-expand your selection to the beginning and end of the query that contains that line. So, double-click, f5.
It also had a nice feature which was, iirc, alt+up/down or maybe alt+shift+up/down, which will extend your selection to the beginning and end of line for each line you move the cursor across, including the one you started on, regardless of where your cursor is on the line. So this is another handy way to select the query you want to execute.
SSMS 2012 did away with those shortcuts (maybe they exist, but they're not the SAME, by default).
With SSMS 2012 you can try SSMS Executor add-in.
Default shortcut Ctrl-Shift-E.
I just mark the line I'm on (Shift + ↓ or Shift + End), and then click Alt + X.
In SSMS 2008R2 with line numbers displayed, you can double-click a line number anywhere adjacent to a query to select the entire query that's part of that line. It's a great feature and I use it all the time.
Unfortunately the feature was lost in the 2012 transition to the Visual Studio editor. I created a Connect issue for this, which I welcome votes on.
A new version of SSMS is in development by Microsoft (kind of new version) it's called SQL Operations Studio.
With SOS (haha) you can hit Ctrl+F5, or — like me — replace the shortcut to Ctrl+Enter
SQL Server Management Studio don't have the feature to execute single SQL statement from the SQL script editor. even we create different shortcut still it doesn't work as we want.
I found a alterative for SQL Server Management Studio => DBeaver
, community version is free.
Download DBeaver
Select SQL server option to connect
Download connector if not already installed(Auto suggest, popup will come)
Shortcut to execute SQL statement/Single line query -> Ctl + Enter
To execute SQL script -> Alt + X
Ctrl k + u will high lite text
f5 to run

SQL Server Management Studio - Grid Result Save As .CSV - How to output Text instead of UTF-16 (Unicode)

In SQL Server Management Studio, can the Grid "Save As" be changed to write out an encoding that is Text instead of UTF-16?
When I right click a Result Grid in In SQL Server Management Studio, it allows for a Save As .CSV. Currently it saves the .CSV file encoded as UTF-16 (Unicode) but Excel does not open this format automatically (Excel prompts for a delimiter). To get around the prompt, I opened the file in SlickEdit and did a Save As "Text". Of course this is an extra step.
This answer applies if you're using Sql Server Management Studio for SQL 2005/2008.
On the "Save Results" form, the "Save" button has a small drop-down button at its right-hand end.
Click this and select "Save with Encoding". Select ANSI to get a single-byte character set.

Resources