You can use the folloeing commands in “Arguments” and “Run Directory” sections of the “Create External Tool” dialog:
||DB Connection String
||File Name Without Extension
||IDE Application Name
||IDE Install Directory
||IDE Oracle Home Directory
||IDE User Directory
||Prompt with Label
We will use the following Select during this post:
SELECT c.owner, c.table_name, c.column_name, c.data_type
FROM ALL_TAB_COLUMNS c
WHERE table_name = 'ALL_TAB_COLUMNS'
AND c.column_name like 'DATA%';
Here is the result:
Select certain cells in the result grid
Before we can copy cells in the result grid, we need to select them:
- click (left mouse button) inside the first cell of the grid you want to copy
- hold down the left mouse button and move your mouse until all cells you want are selected (marked)
- release the left mouse button
Select all cells in the result grid
If you want to select all cells in the result grid
- click somewhere in the result grid (left mouse button)
- press CTRL+a to select all cells
Copy cells from the result grid
Select the cells you want to copy and press CTRL+c.
Go to the program of your choice, I will use Excel here, and press CTRL+v:
Copy cells with headers from the result grid
Select the cells you want to copy and press CTRL+Shift+c.
Go to the program of your choice, again Excel here, and press CTRL+v:
Are you missing the feature to record and playback a macro in SQL-Developer?
Well, it’s there, just a bit hidden!
[Update: If you use SQL Developer version 4.01 or newer please read this post: Using macros – Update for version 4.01 ++]
Activate the macro functions
- Select “Tools/Preferences” from the main menu.
- Select “Shortcut Keys” in the list on the left.
- Enter “macro” the right search field.
- Assign “Ctrl+Period” to “Macro Playback”. Period is the “.” key on your keyboard.
- Assign “Ctrl+Shift+Period” to “Macro Toggle Recording”.
Record a macro
To start the recording of the macro, use an editor window of SQL-Developer and press the keys control (ctrl), shift and period (.) together.
The status bar on the bottom shows “Keystroke recording started.”
Any key you will press from now on will be recorded for replay through this macro.
When you are done press the keys control (ctrl), shift and period (.) together again.
The status bar on the bottom shows “Keystroke recording ended.”
There is only one drawback: You can only have one macro at a time. When you record a new macro the previous macro is gone!
Use the macro
Just press the keys control (ctrl) and period (.) together and your macro gets played back.
Adding quotes and commas to a list
Ever wanted the get rid of manually adding quotes and commas to a list of strings?
With a macro it is easy to get from this:
Here is how:
- Go to the first line of the list.
- Start the recording by pressing the keys control (ctrl), shift and period (.) together.
- Press the following keys (pos1) (‘) (end) (‘) (,) and (“arrow down”) one after each other.
- End the recording by pressing the keys control (ctrl), shift and period (.) together again.
- Play back the macro by pressing the keys control (ctrl) and period (.) together.
- Repeat step 5 until the list is done.