Chapter 5 Building Triggers and Procedures


Using the Definition tab toolbar

You can modify the code of a trigger, trigger template, or template item from its Definition tab.

The Definition tab toolbar allows you to insert the following kinds of script items at the position of the cursor:

Tool Tooltip Description

Add Trigger Item From Model [Triggers and trigger templates only] Opens a dialog box to select a trigger template item defined in the model for insertion in the trigger definition.

Add Trigger Item From DBMS [Triggers and trigger templates only] Opens a dialog box to select a trigger template item defined in the DBMS definition file for insertion in the trigger definition.

Operators Lists logical operators for insertion in the trigger definition.

Functions Lists group, number, string, date, conversion and other functions for insertion in the trigger definition.

Macros Lists macros for insertion in the trigger definition. For more information on macros, see the "Writing SQL Statements in PowerDesigner" appendix.

Variables Lists variables for use with operators and functions for insertion in the trigger definition. You can also use formatting variables that have a syntax that can force a format on their values, as follows:

  • Force values to lower-case or upper-case characters
  • Truncate the length of values


For more information on variables, see List of PowerDesigner variables in chapter Variables in PowerDesigner.

Edit with SQL Editor Opens the SQL Editor dialog box. Provides object types and available objects for insertion in the trigger definition.

SQL/XML Wizard Opens the SQL/XML Wizard to build a SQL/XML query from a table or a view and insert it in the trigger definition. For more information on the SQL/XML Wizard, see "Using the SQL/XML Wizard".

Insert SQL/XML Macro Opens a dialog box to select a global element in an XML model open in the workspace with the SQL/XML extended model definition. Inserts a SQL/XML macro referencing the selected element in the trigger definition.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.