Hi, my name is Olga, and I'm a content developer in Toad for SQL Server [INAUDIBLE]. In this video, I'll give you some tips and tricks, how you can explore large scripts with a script map. I will also show you how you can easily browse in the [INAUDIBLE] for your scripts using the script map feature.
I've got a test script prepared in the editor. It's quite long and complicated. It includes number of statements as well as [INAUDIBLE], such as inserts, drops, grades, selects. Also subqueries, declarations, and many, many others.
So when working with such script, it's difficult to jump between the statements every now and then and scroll the script up and down. So the script map can be a real help for me. The script map pane provides first structures and clear representation of the scripts in the editor, And allows to easily manipulate statements and statement groups.
By default the script map is switched on. But you can also invoke it with editor, window script map. Now the script map is empty, so to fill it I click the refresh button. Now consider script structure. Script map supports most of SQL statements and recognizes nesting levels. For example, the code blocks, named regions, and others.
For example, the [? nesting ?] is [INAUDIBLE] for storage procedures and functions. What's more, I can collapse and expand high-level structures, such as batches and blocks. The search pane provides me with search functionality, so I can find our required statements and objects way faster.
At the same time, I can customize which exactly statements I want to see. For example, I'm interested in the critical statements on [INAUDIBLE]. So I go to Options, and clear the other statements. So I have on inserts, deletes, and drops here. So here we go. And I can restore to default with a single click.
I can quickly get to the queries I am interested in with a double click. Or I can right click a statement and select an option from the context menu. For example, I can select Go To, Cut, Select, turn into Comment, or Surround with snippet. At the same time, when I alter the scripts in [INAUDIBLE], the script map continues to reflect the [INAUDIBLE] of the script, so please make sure to update it every time you delete or add the statements in the editor.
Also script map allows to manage scripts as separate queries. You can select one of several items in the script map pane. Right click them and select Execute. All of these statements will be executed in the script.
Script map can be helpful for quick review in the script. For example, I have a mistake here. So when I refresh the script map, I can see that some items are underlined red. This means that there is something wrong. The batch is also underlined red, so in case I collapse it, I'll still be able to see that I have something to fix there. When I hover the mouse over the incorrect statement, I can see the teletape, so I can easily fix it.
To learn more about Toad for SQL Server, please visit was Quest.com/Toad-For-SQL-Server, and join community at ToadforSQLServer. com. Thank you for attention, and goodbye.