导出的建表脚本表名出现引号
================================
是因为在powerdesign的设置问题,点在菜单Database>Edit Current DBMS...后,在弹出窗口左边的树中找到
Script>sql>Format>CaseSensitivityUsingQuote,把该值设为false便可以了。
powerdesign导出name作为comment
================================
首先打开PDM,tools->execute commands->edit/run script
运行以下脚本,将name拷贝为comment
原文链接:https://www.f2er.com/vb/261810.html运行以下脚本,将name拷贝为comment
- OptionExplicit
- ValidationMode=True
- InteractiveMode=im_Batch
- Dimmdl'thecurrentmodel
- 'getthecurrentactivemodel
- Setmdl=ActiveModel
- If(mdlIsNothing)Then
- MsgBox"ThereisnocurrentModel"
- ElseIfNotmdl.IsKindOf(PdPDM.cls_Model)Then
- MsgBox"ThecurrentmodelisnotanPhysicalDatamodel."
- Else
- ProcessFoldermdl
- EndIf
- 'Thisroutinecopynameintocodeforeachtable,eachcolumnandeachview
- 'ofthecurrentfolder
- PrivatesubProcessFolder(folder)
- DimTab'runningtable
- foreachTabinfolder.tables
- ifnottab.isShortcutthen
- tab.comment=tab.name
- Dimcol'runningcolumn
- foreachcolintab.columns
- col.comment=col.name
- next
- endif
- next
- endsub
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