Due to the time the table was built, in the production of SQL PD in the column name is added "" This thing, so only through the following VB script can be modified in bulk, Edit/run Scripts under Tools=>execute commands, or by CTRL + Shift+x Run the following script:
‘*****************************************************************************
' File: Powerdesigner.ucase.VBs
' Version: 1.0
' Function: Traverse all the tables in the physical model, changing the table name, table code, field name, field code all from lowercase to uppercase;
' and change the name and code of the sequence from lowercase to uppercase.
' Usage: Open the physical model, run this script (ctrl+shift+x)
Notes
‘*****************************************************************************
Dim model ' Current model
Set model = Activemodel
If (model is nothing) then
MsgBox "There is no current Model"
ElseIf not model. IsKindOf (Pdpdm.cls_model) Then
MsgBox "The current model isn't an physical Data model."
Else
Processtables model
Processsequences model
End If
‘*****************************************************************************
' Function: processsequences
' Function: Recursive traversal of all sequences
‘*****************************************************************************
Sub Processsequences (folder)
' Process the sequence in the model: lowercase to uppercase
Dim sequence
For each sequence in folder.sequences
Sequence.name = UCase (sequence.name)
Sequence.code = UCase (Sequence.code)
Next
End Sub
' *****************************************************************************
' functions: ProcessTables
Functions: recursively traverse all tables
' *****************************************************************************
sub processtables (folder)
' working with tables in the Model
dim table
for each table in Folder.tables
if not table. Isshortcut then
processtable table
end if
next
' subdirectories recursively
dim Subfolder
for each subfolder in folder. Packages
processtables subfolder
next
End Sub
‘*****************************************************************************
' Function: processtable
' function: Iterates through all fields of the specified table, changing the field name from lowercase to uppercase.
' field code is changed from lowercase to uppercase
' The table name is changed from lowercase to uppercase
‘*****************************************************************************
Sub Processtable (table)
Dim col
For each of the Col in table. Columns
' Change the field name from lowercase to uppercase
Col.code = UCase (Col.code)
Col.name = UCase (col.name)
Next
Table.name = UCase (table.name)
Table.code = UCase (Table.code)
End Sub
Bulk powerdesigner table fields from lowercase to uppercase