Domanda

I'm using Toad for Oracle for accessing Oracle databases. Is there a possibility to invoke custom scripts from Toad so that you don't always have to type these from scratch? E.g. I would like to create custom script

select count(*) as cnt
from 

and invoke this using custom text like

scf

This kind of functionality is found e.g in Redgate's SQL Prompt:

It doesn't tell you how you should write code, either. You can tell SQL Prompt exactly how you like your SQL, and add your own code snippets to the customizable library

È stato utile?

Soluzione

It is called Code Snippets

Insert Code Snippets: http://dev.toadformysql.com/webhelp/Content/Editor/Code_Snippets/Code_Snippets.htm

If you defined it correctly then:

"If you know the shortcut name for a snippet, enter the shortcut name and press CTRL+SPACE."

Altri suggerimenti

You can also use auto-replace to solve your problem if it's a single line of text.

I use "sfr" for SELECT * FROM.

As soon as I type "sfr" and press space or tab, it replaces it with SELECT * FROM.

Go to View -> Toad Options -> Editor -> Auto Replace

Go to view, toad options, in the sub editor you should find behaviour, click add on top right pane, and insert your preferred shortcut

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top