Writing SQL Code in the PowerDesigner SQL Editor

The PowerDesigner SQL Editor provides syntax coloring and tools to help you write SQL code.

You may need to write SQL code in order to:

The SQL Editor dialog box is divided into three panes with a toolbar across the middle:



  • Upper left pane - lists available object types
  • Upper right pane - lists the available objects of the selected type. Double-click an object to insert it into your code
  • Toolbar - provides editor tools including lists proposing functions, operators, variables, and macros to insert into your code (see SQL Editor Tools).
  • Lower pane - contains the query code
Note:

Instead of hard coding the names of tables, columns, and other objects in your SQL statements, you can use the PowerDesigner Generation Template Language (GTL) or the PDM variables and macros to obtain these values from the model.

While you can perform many tasks using the PDM variables and macros, the GTL is more powerful, as it allows you to access any information about any object in the model.

For detailed information about GTL, see Customizing and Extending PowerDesigner > Customizing Generation with GTL .