Posts

It happens more often than I like to admit, but I was asked a question about Toad that I could not figure out. A co-worker was trying to help a customer emulate a SSMS feature – the ability to program stored procedures to a keyboard shortcut or keystroke sequence.

I got part of the way there – Code Snippets. These can be customized and programmed by the end user to call frequently bits of code or scripts on demand. What I was missing was how to assign a keyboard shortcut to each snippet. Of course it was staring at me right in the face.

Thankfully @kekline put my nose in it in such a way I could not miss it – thanks Kevin! So just in case the rest of you are wondering how to do this, here’s a step-by-step:

How Microsoft SQL Server Management Studio (SSMS) Does It

  • Tools – Options
  • Keyboard page
  • Assign a shortcut to your favorite Stored Procedure (SP)
  • You can assign as many as 10 shortcuts (0-9)
  • Ctrl+1 in an editor window will auto-execute sp_who

How Toad Does It

Toad ships with several dozen code snippets. You can invoke them by using a right-click in the editor, or you can assign a keyboard shortcut to each of them as you see fit.

To see all the Code Snippets, open them on the menu View – Code Snippets. I am going to create a new snippet group called SSMS.

Once the group is created, I will add a snippet for each of the three SPs that SSMS has coded. First, I will create a new snippet:

The properties:

  • Design – this is where you put your code
  • Title – this is what will show in the snippet panel
  • Shortcut – this is the NAME of the snippet, and what you will use to invoke the command in the editor.
  • Help URL – you can document your code snippets. In this case I supplied the MSDN page for sp_help
  • I went ahead and coded all three SPs from SSMS:

All Right, Let’s Do This Already!

In the editor, to invoke the snippet, type the name and use the Ctrl+Spacebar key sequence. You then need to use F5 to execute it.

So in the above example, here is what I type:

‘who’ followed by ‘Ctrl+Spacebar’

Toad places the code into the editor. I can then edit or execute it as I require.

That’s an extra keystroke over what SSMS requires. However, you do get to see the code used, and you have the ability to create an unlimited number of SPs you want to code into Toad. I think that is a fair tradeoff.

ÁP DỤNG PHẦN MỀM PL/SQL VỚI TRUNG TÂM ĐÀO TẠO SEO TANDIGI


Trung tâm Đào Tạo Digital Marketing Online TanDiGi là một trong những đơn vị lớn nhất chuyên đào tạo Digital Marketing, chuyên sâu từng công cụ Online để áp dụng vào kinh doanh, giúp quý khách hàng tự tin có thể kinh doanh và xây dựng thương hiệu trong bất cứ lĩnh vực nào bạn mong muốn. TanDiGi sẽ giúp quý khách hàng hiểu rõ các kênh marketing có những điểm mạnh, điểm yếu và vai trò như thế nào để có thể khai thác triệt để, tìm kiếm khách hàng mới và giữ chân khách hàng cũ phù hợp với từng giai đoạn của doanh nghiệp. Để từ đây quý khách hàng sẽ có chiến lược dài hạn giúp tăng doanh số qua các kênh có tính bền vững cao và chi phí thấp (như website, SEO, email marketing…).

Ngoài ra, đến với khóa học seo ECLT (chi tiết khóa học: https://tandigi.com/dao-tao-seo) các bạn sẽ được trải nghiệm những phần mềm xây dựng với cơ sở dữ liệu SQL Server 2014, nền tảng .NET. để quản lý các dự án của mình một cách tối ưu nhất. Với nhiều năm kinh nghiệm trong ngành thì Tandigi là lựa chọn số 1 để các bạn chọn học SEO nói chung và áp dụng phần mềm PL/SQL vào việc quản lý

There's nothing here!