Home Database Mysql Tutorial PowerDesigner16.5导出SQL语句时如何将name列复制到comment注释

PowerDesigner16.5导出SQL语句时如何将name列复制到comment注释

Jun 07, 2016 pm 02:50 PM
sql how Export statement

很多人都会想在使用PowerDesigner设计完数据库时自动 将name列在输出时自动复制到comment列 运行脚本 Tools-Execute Commands-Edit/Run Scripts(快捷键:CtrlShiftX) VB脚本如下: ' 把pd中那么name想自动添加到comment里面 '如果comment为空,则填入name;

很多人都会想在使用PowerDesigner设计完数据库时自动将name列值在输出时自动复制到comment列

运行脚本 Tools->Execute Commands->Edit/Run Scripts(快捷键:Ctrl+Shift+X)

VB脚本如下:


' 把pd中那么name想自动添加到comment里面 '如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. 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 comment 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 trim(tab.comment)="" then '如果有表的注释,则不改变它.如果没有表注释.则把name添加到注释里面.        tab.comment = tab.name     end if   Dim col ' running column   for each col in tab.columns   if trim(col.comment)="" then '如果col的comment为空,则填入name,如果已有注释,则不添加;这样可以避免已有注释丢失.    col.comment= col.name   end if  next    end if   next       Dim view 'running view   for each view in folder.Views    if not view.isShortcut and trim(view.comment)=""  then   view.comment = view.name    end if   next       ' go into the sub-packages   Dim f ' running folder   For Each f In folder.Packages    if not f.IsShortcut then   ProcessFolder f    end if   Next  end sub
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the difference between HQL and SQL in Hibernate framework? What is the difference between HQL and SQL in Hibernate framework? Apr 17, 2024 pm 02:57 PM

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

Usage of division operation in Oracle SQL Usage of division operation in Oracle SQL Mar 10, 2024 pm 03:06 PM

"Usage of Division Operation in OracleSQL" In OracleSQL, division operation is one of the common mathematical operations. During data query and processing, division operations can help us calculate the ratio between fields or derive the logical relationship between specific values. This article will introduce the usage of division operation in OracleSQL and provide specific code examples. 1. Two ways of division operations in OracleSQL In OracleSQL, division operations can be performed in two different ways.

Exporting songs downloaded from QQ Music as mp3 on mac only requires two steps Exporting songs downloaded from QQ Music as mp3 on mac only requires two steps Jan 05, 2024 pm 07:10 PM

Listening to music is a very common thing, I believe many friends will do it no matter where they are. What software do you usually use to listen to music? Do you use QQ Music like me? I currently use QQ Music to listen to songs, and it can be used not only on mobile phones, but also on Mac computers. In addition to listening to songs online, we can also download our favorite songs from QQ Music to the computer. However, the songs downloaded from QQ Music for Mac are not in the format we need. What we need is music in MP3 format. So how to export the songs downloaded from QQ Music for Mac to MP3 format? How to export and convert songs downloaded from QQ Music for Mac to MP3 format? If you want to export and convert songs downloaded from QQ Music for Mac to MP

Comparison and differences of SQL syntax between Oracle and DB2 Comparison and differences of SQL syntax between Oracle and DB2 Mar 11, 2024 pm 12:09 PM

Oracle and DB2 are two commonly used relational database management systems, each of which has its own unique SQL syntax and characteristics. This article will compare and differ between the SQL syntax of Oracle and DB2, and provide specific code examples. Database connection In Oracle, use the following statement to connect to the database: CONNECTusername/password@database. In DB2, the statement to connect to the database is as follows: CONNECTTOdataba

What does the identity attribute in SQL mean? What does the identity attribute in SQL mean? Feb 19, 2024 am 11:24 AM

What is Identity in SQL? Specific code examples are needed. In SQL, Identity is a special data type used to generate auto-incrementing numbers. It is often used to uniquely identify each row of data in a table. The Identity column is often used in conjunction with the primary key column to ensure that each record has a unique identifier. This article will detail how to use Identity and some practical code examples. The basic way to use Identity is to use Identit when creating a table.

How to get Douyin private message emoticons on WeChat? How to export the private message emoticon package? How to get Douyin private message emoticons on WeChat? How to export the private message emoticon package? Mar 21, 2024 pm 10:01 PM

With the continuous rise of social media, Douyin, as a popular short video platform, has attracted a large number of users. On Douyin, users can not only show their lives but also interact with other users. In this interaction, emoticons have gradually become an important way for users to express their emotions. 1. How to get Douyin private message emoticons on WeChat? First of all, to get private message emoticons on the Douyin platform, you need to log in to your Douyin account, then browse and select the emoticons you like. You can choose to send them to friends or collect them yourself. After receiving the emoticon package on Douyin, you can long press the emoticon package through the private message interface, and then select the "Add to Emoticon" function. In this way, you can add this emoticon package to Douyin’s emoticon library. 3. Next, we need to add the words in the Douyin emoticon library

Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Detailed explanation of the Set tag function in MyBatis dynamic SQL tags Feb 26, 2024 pm 07:48 PM

Interpretation of MyBatis dynamic SQL tags: Detailed explanation of Set tag usage MyBatis is an excellent persistence layer framework. It provides a wealth of dynamic SQL tags and can flexibly construct database operation statements. Among them, the Set tag is used to generate the SET clause in the UPDATE statement, which is very commonly used in update operations. This article will explain in detail the usage of the Set tag in MyBatis and demonstrate its functionality through specific code examples. What is Set tag Set tag is used in MyBati

How to export xmind files to pdf files How to export xmind files to pdf files Mar 20, 2024 am 10:30 AM

xmind is a very practical mind mapping software. It is a map form made using people's thinking and inspiration. After we create the xmind file, we usually convert it into a pdf file format to facilitate everyone's dissemination and use. Then How to export xmind files to pdf files? Below are the specific steps for your reference. 1. First, let’s demonstrate how to export the mind map to a PDF document. Select the [File]-[Export] function button. 2. Select [PDF document] in the newly appeared interface and click the [Next] button. 3. Select settings in the export interface: paper size, orientation, resolution and document storage location. After completing the settings, click the [Finish] button. 4. If you click the [Finish] button

See all articles