Create a launch configuration to guide you through running stored procedures, user-defined functions, events,
and triggers. You can save the launch configuration to the Run and/or Debug menus, so you can quickly and easily run this object again.
PrerequisitesÂ
Create the routine object or select an existing one.
-
In Data Source Explorer, click a stored procedure or trigger.
-
Select
.
-
-
-
Run an existing
routine object with either of the following methods.
Note: These methods do not enable you to create routine objects. You
must create the objects first before running them in Eclipse.
-
Create a launch configuration, and then run the
routine object. This method allows you to track
different configurations of the same procedure so that you can easily repeat
its execution.
Select
from the Eclipse toolbar to open the
Launch Configuration wizard. You can
configure parameters and run configurations from the
Create, Manage, and Run Configurations
page.
-
Run the procedural object from
Data Source Explorer. Change parameters
on the
Configure Parameters page. This method
is faster to set up and run, but you cannot save launch configurations for
future use.
-
From the
Tables folder, select the table where the
trigger is located and expand it.
Open the Triggers folder and select the trigger.
-
Right-click the trigger and select
Run Trigger.
The
Trigger field in the
Type frame is selected.
-
Click the
SQL... button and select
Insert,
Update, or
Delete.
-
In
the
Column Name field, insert the values that you
want the trigger to use by clicking on the column name.
Use the buttons to insert a Null value; Select to return the
values to be inserted by the insert statement; and Clear to remove any entered
insert values. Add arguments as appropriate. If you selected Delete, you see a
list of columns in the table; use the various clause tabs to modify the Delete
trigger.
Table 1. Insert column values SQL statements
Statement
|
Action
|
insert
|
All column names appear. In the
Column Name field, enter values
that you want the trigger to insert.
|
update
|
Choose the columns whose values you want the trigger
to update by single-clicking the column name. Enter values in the
Column Name field.
|
delete
|
No action at the statement level. Use the
Where and
Having clause tabs to limit the
rows the trigger deletes.
|
Use the drop-down lists on the Where and Having tabs to delimit
the rows you want the trigger to insert, update, or delete. Manipulate the
columns in the Sort and Group clauses to organize the ways in which results are
returned. See Using Visual SQL to Edit a Procedural Object to obtain more
information about clauses. You can preview the code you have created by
selecting the Preview tab. When you are finished, click OK to return to the
Modify Attributes and Launch page.
-
Click
Apply to apply the value changes to the launch
configuration, then click
Run.
The code appears in the editor, and you can view results in
SQL Results view.