Is there a shortcut for adding commas for values for IN clause? e.g. if my query SELECT * FROM Persons WHERE Id IN(.....)
and I've copied
356
9874
5975
9771
4166
....
Person's Id values let's say from some Excel file, How can I quickly add ',' comma to the end of each line, so I can paste it IN(....) clause?
The key combination of "CTRL+R" is used to show or hide the query results pane. Sometimes we do not require a query results pane and therefore it can be hidden using the keyboard shortcut keys "CTRL+R". However, there is no direct option to hide this pane.
Execute Scripts in SQL Server Management Studio If you want to parse all the scripts without executing them in the current query window, simply press CTRL+F5 or you can select some lines of code to be parsed then press CTRL+F5.
Here's what you need to do:
ALT + SHIFT
and click the down key for as many numbers as you have. You should see a blue line just to the right of your numbers. This is why you needed the extra space after 356 - so that you can just arrow down the entire list without having to move left or right.You can use this method to add quotes or other characters to your SQL queries as well.
I use this in SSMS 2014;
I am not sure if this can be done in previous versions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With