导出的建表脚本表名出现引号
================================
是因为在powerdesign的设置问题,点在菜单Database>Edit Current DBMS...后,在弹出窗口左边的树中找到
Script>Sql>Format>CaseSensitivityUsingQuote,把该值设为false便可以了。
powerdesign导出name作为comment
================================
首先打开PDM,tools->execute commands->edit/run script
运行以下脚本,将name拷贝为comment
然后在database->generate database->options->table&column中分别选中table和column的coment,导出表的时候,即可导出comment
运行以下脚本,将name拷贝为comment
- Option Explicit
- ValidationMode = True
- InteractiveMode = im_Batch
- Dim mdl ' the current model
- ' get the current active model
- Set mdl = ActiveModel
- If (mdl Is Nothing) Then
- MsgBox "There is no current Model"
- ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
- MsgBox "The current model is not an Physical Data model."
- Else
- ProcessFolder mdl
- End If
- ' This routine copy name into code for each table, each column and each view
- ' of the current folder
- Private sub ProcessFolder(folder)
- Dim Tab 'running table
- for each Tab in folder.tables
- if not tab.isShortcut then
- tab.comment=tab.name
- Dim col ' running column
- for each col in tab.columns
- col.comment=col.name
- next
- end if
- next
- end sub
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl ' the current model
' get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model"
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model."
Else
ProcessFolder mdl
End If
' This routine copy name into code for each table, each column and each view
' of the current folder
Private sub ProcessFolder(folder)
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.comment=tab.name
Dim col ' running column
for each col in tab.columns
col.comment=col.name
next
end if
next
end sub
然后在database->generate database->options->table&column中分别选中table和column的coment,导出表的时候,即可导出comment