Sybase PowerDesigner Modify many types (search / replace / convert) of data data

I have a relatively large conceptual data model in PowerDesigner. After creating the physical data model and viewing the DBMS data types, I need to update all data types (NUMBER / TEXT) for each data item.

I would like to either find / replace in the Conceptual Data Model, or somehow map different types of data when creating a physical data model. Ex. Change the automatic conversion of the text -> Clob, to text -> NVARCHAR (20).

Thank!

+3
source share
3 answers

"" , . - VBScript ? , , , :

:

Set mdl=ActiveModel

FOR EACH TAB IN MDL.Entities
   IF (not tab.isShortcut) THEN
      FOR EACH COL IN TAB.ATTRIBUTES
         IF COL.DATATYPE = "TXT" THEN
            COL.DATATYPE = "VA20"
         END IF
      NEXT
   END IF
NEXT

, , - "TXT" (), "VA20" ( (20)).

:

Set mdl=ActiveModel

FOR EACH TAB IN MDL.Tables
   IF (not tab.isShortcut) THEN
      FOR EACH COL IN TAB.COLUMNS
         IF COL.DATATYPE = "TEXT" THEN
            COL.DATATYPE = "NVARCHAR(20)"
         END IF
      NEXT
   END IF
NEXT
+3

CLOB NVARCHAR (20), - , Model- > Columns... , , . ,

+2

:

.

, Sybase, "" ( ...) ( - ).

( ), . .

0

Source: https://habr.com/ru/post/1748879/


All Articles