Chapter 5 Building Triggers and Procedures


Using the SQL/XML Wizard

You can use the SQL/XML Wizard to insert a SQL/XML query in the definition of a trigger, a stored procedure or a function. With the SQL/XML Wizard, you select tables and views from a PDM to build a mapped XML model. This silent XML model (it does not appear in the workspace) is used to generate SQL/XML queries from global elements. These SQL/XML queries allow you to store or retrieve data, in an XML format, from relational databases supporting SQL/XML.

During the SQL/XML Wizard process, you can perform the following actions:

Steps To insert a SQL/XML query in the definition of a trigger:

  1. In the trigger property sheet, select the Definition page and position the cursor in the trigger definition where you want to insert the SQL/XML query.
  2. In the toolbar of the Definition page, click the SQL/XML Wizard tool.
  3. Select tables and views and click Next.
  4. Build an XML hierarchy and click Next.
  5. In the Query page, click Finish.

These different actions are detailed in the following sections.

Note: The trigger used in the following sections is defined in project.pdm, a PDM from the PowerDesigner Examples library.

 


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