Chapter 10 Generating a Database from a PDM


Inserting begin and end scripts for table creation

For each table, you have the option to insert the following scripts:

Script Where it is inserted
Begin script Immediately before the table creation command (after the table title)
End script Immediately after the table creation command

These scripts can appear in database creation scripts and database modification scripts.

You can use the following variables in these scripts:

Variable Description
%COLNLIST% Column list
%DATABASE% Code of the current PDM
%DATE% Date of script generation
%DBMSNAME% Code of the DBMS for the target database
%NAMESCRIPT% Filename of script file
%OWNER% Table owner
%OWNERPREFIX% Owner prefix of table owner
%PATHSCRIPT% Filename and path of script file
%STARTCMD% Command that runs the script
%TABLE% Name or code of current table (based on display preferences)
%TCODE% Code of the current table
%TLABL% Label of the current table
%TNAME% Name of the current table
%AUTHOR% Author of the current model

Steps To insert begin and end scripts for table creation:

  1. Double-click a table symbol.

    The table property sheet appears.
  2. Click the Script tab.

    The Script page opens to the Begin page.
  3. Type the DBMS-specific commands to insert in the beginning of the script.
  4. Click the End tab at the bottom of the page.
  5. Type the DBMS-specific commands to insert at the end of the script.
  6. Click OK.

 


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