当前位置:网站首页>Powerdesign reverse wizard such as SQL and generates name and comment
Powerdesign reverse wizard such as SQL and generates name and comment
2022-07-03 09:23:00 【Great you don't know】
First step : Modify the export SQL
open Power Designer , choice Database->Edit Current DBMS… Open the dialog box , find Script->Objects->Table->SqlListQuery, Modify after opening value Medium sql sentence , The results are as follows :
{OWNER, TABLE, TABLE_TYPE, COMMENTS}
select
t.owner,
t.table_name,
c.table_type,
c.comments
from
sys.all_all_tables t,
sys.USER_TAB_COMMENTS c
where
not exists (select 1 from sys.all_mviews s where s.owner = t.owner and t.table_name in (s.mview_name, s.update_log))
and t.iot_name is null
and nvl(t.dropped, 'NO') = 'NO'
and t.table_name = c.table_name(+)
[ and t.table_name=%.q:TABLE%]
[ and t.owner=%.q:SCHEMA%]
order by
t.owner, t.table_name
The second step : Set up code Do not follow name change
Choose from the menu Tools->General Options…, Find... In the open window Dialog, Get rid of Name to Code mirroring Front hook , Click on OK.
The third step : Use the script to name Set to comments
Choose from the menu Tools->Excute Commands -> Edit/Run Scripts… Paste the following script in the open window , Click on Run Button .
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
if len(tab.comment) <> 0 then
tab.name = tab.comment
end if
On Error Resume Next
Dim col 'running column
for each col in tab.columns
if len(col.comment) <>0 then
col.name =col.comment
end if
On Error Resume Next
next
end if
next
end sub
边栏推荐
- Hudi learning notes (III) analysis of core concepts
- npm install安装依赖包报错解决方法
- Jenkins learning (III) -- setting scheduled tasks
- Common formulas of probability theory
- 2022-2-13 learning the imitation Niuke project - home page of the development community
- Jenkins learning (I) -- Jenkins installation
- Vs2019 configuration opencv3 detailed graphic tutorial and implementation of test code
- 传统企业数字化转型需要经过哪几个阶段?
- What is an excellent fast development framework like?
- [kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
猜你喜欢
Crawler career from scratch (II): crawl the photos of my little sister ② (the website has been disabled)
2022-2-13 learning the imitation Niuke project - home page of the development community
[kotlin learning] classes, objects and interfaces - define class inheritance structure
[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation
[kotlin learning] classes, objects and interfaces - classes with non default construction methods or attributes, data classes and class delegates, object keywords
【点云处理之论文狂读经典版11】—— Mining Point Cloud Local Structures by Kernel Correlation and Graph Pooling
[graduation season | advanced technology Er] another graduation season, I change my career as soon as I graduate, from animal science to programmer. Programmers have something to say in 10 years
2022-2-14 learning xiangniuke project - Session Management
Computing level network notes
【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
随机推荐
[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation
Build a solo blog from scratch
AcWing 786. Number k
Explanation of the answers to the three questions
[kotlin puzzle] what happens if you overload an arithmetic operator in the kotlin class and declare the operator as an extension function?
【点云处理之论文狂读经典版14】—— Dynamic Graph CNN for Learning on Point Clouds
Redis learning (I)
Jenkins learning (III) -- setting scheduled tasks
【Kotlin学习】运算符重载及其他约定——重载算术运算符、比较运算符、集合与区间的约定
In the digital transformation, what problems will occur in enterprise equipment management? Jnpf may be the "optimal solution"
[set theory] order relation (eight special elements in partial order relation | ① maximum element | ② minimum element | ③ maximum element | ④ minimum element | ⑤ upper bound | ⑥ lower bound | ⑦ minimu
Recommend a low code open source project of yyds
LeetCode 324. Swing sort II
Linxu learning (4) -- Yum and apt commands
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available. Prompt to upgrade pip
精彩回顾|I/O Extended 2022 活动干货分享
[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition
Win10 quick screenshot
2022-2-13 learning the imitation Niuke project - home page of the development community
数字化管理中台+低代码,JNPF开启企业数字化转型的新引擎