Chapter 15 Writing SQL Statements in PowerDesigner


PowerDesigner Formatting Variables

Variables have a syntax that can force a format on their values, as follows:

When a variable does not specify formatting, its values have the same format as in the PDM.

Format code Format of variable value in script
.L Lower-case characters
.T Removes blank spaces
.U Upper-case characters
.c Upper-case first letter and lower-case next letters
.n Maximum length where n is the number of characters
n Justifies to fixed length where n is the number of characters
-n Right justify variable text to fixed length where n is the number of characters

You embed formatting options in variable syntax as follows:

%.format:variable%

For example:

%.L:TABLE%

The table below shows formatted variables and their results in a script for the table EMPLOYEE.

Template statement with variable Resulting script statement
create trigger %TABLE% create trigger EMPLOYEE
create trigger %.L:TABLE% create trigger employee
create trigger %.U:TABLE% create trigger EMPLOYEE
create trigger %.4:TABLE% create trigger EMPL
create trigger %.4L:TABLE% create trigger empl

 


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