10. Data model (ER diagram) into SQL script, require the exported fields to be uppercase

Source: Internet
Author: User

1. Enter Tools-->execute commands-->edit/run script, execute the following scripts to achieve all the fields to capitalize;

Option Explicit
Validationmode = True
Interactivemode = Im_batch
Dim MDL ' current model
' Get current model
Set mdl = Activemodel
If (MDL is Nothing) then
MsgBox "Not open a model"
ElseIf not MDL. IsKindOf (Pdpdm.cls_model) Then
MsgBox "The current model is not a PDM"
Else
' Call handler
ProcessFolder MDL
End If
' handler called
Private Sub ProcessFolder (folder)
Dim Tab ' table to be processed
For each Tab in folder. Tables
' if not tab.isshortcut then
' Tab.code = Tab.name
' table name processing, preceded by prefix, letter lowercase
tab.name= UCase (tab.name)
tab.code= UCase (tab.code)
Dim col ' columns to process
For each col in Tab.columns
' column name and code all lowercase, big poem UCase
col.code= UCase (col.code)
col.name= UCase (col.name)
Next
' End If
Next
' Process View
' Dim View ' running view
' For each view in folder. views
' if not view.isshortcut then
' View.code = View.name
' End If
' Next
' recursion into Sub-packages
Dim F ' Sub folder
For each f in folder. Packages
if not f.isshortcut then
ProcessFolder F
End If
Next
End Sub

10. Data model (ER diagram) into SQL script, require the exported fields to be uppercase

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.