サポートと今すぐチャット
サポートとのチャット

Toad Data Studio 1.1 - Installation Guide

Record and Play Macros

Use Macros to record a series of keyboard commands in the Editor that can be played back multiple times. This is useful for reducing the amount of manual typing you have to do.

Scenario

You have an INSERT statement with 500 lines of data to insert in the Directors table of the MOVIES database. Before executing the script, a new policy is created to change the order of two columns from LastName, FirstName to FirstName, LastName. Using Macros, you can record the keystroke actions to switch the order of the data values to FirstName and LastName for the first line; and can then press CTRL+SHIFT+P to play the macro and switch the order for the remaining 499 lines.

To create a macro for this example

  1. Place the cursor at the beginning of the first row.

  2. Press CTRL+SHIFT+R to begin recording the macro.

  3. Press CTRL+SHIFT+RIGHT to select the value for LastName in the first row.

  4. Press CTRL+X to remove the LastName.

  5. Press DELETE to remove the comma.

  6. Press END to move to the end of the line.

  7. Press ”,” to add a comma.

  8. Press CTRL+V to paste the LastName after the FirstName.

  9. Press HOME to return to the start of the line.

  10. Press DOWN to move to the next line.

  11. Press CTRL+SHIFT+R to stop recording.

  12. Press CTRL+SHIFT+P to play the macro.

 

Related Topics

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択