Toad World® Forums

TABLE COMPLETED IN DATABASE CREATION

Is there a graphical way to insert data into a table using Toad for it to be generated along with DDL, like as if they were attached data tables. Example:
I have a Unit of Measure table and would like to be already with the table when the database was created information:
ID Description Abbreviation
1 Kilogram Kg
2 Liter L
3 grass g

You could create the table in your source environment and then export it. That would capture the structure and the data. Then just import it into your target.

Sent from my Verizon 4G LTE Smartphone

---- hugotsouza wrote ----

TABLE COMPLETED IN DATABASE CREATION

Thread created by hugotsouza
Is there a graphical way to insert data into a table using Toad for it to be generated along with DDL, like as if they were attached data tables. Example:

I have a Unit of Measure table and would like to be already with the table when the database was created information:

ID Description Abbreviation

1 Kilogram Kg

2 Liter L

3 grass g

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad Data Modeler - General
notifications altogether.

Toad Data Modeler - Discussion Forum

Flag
this post as spam/abuse.

But this way every time I make a change in the model and generate a new version of DDL through TOAD I’ll have to export and create all this data again.

Hello there,

If you absolutely necessarily need to generate a new DDL script every time you make changes, I would suggest putting a INSERT SQL script into the After Script tab of Entity Properties or Model Properties. All SQL code in After Script tab is executed once the given object is created in DDL script. So, for example, when you put the INSERT query into:

  • Entity Properties - The code will be executed once the entity is generated
  • Model Properties - The code will be executed once all objects in the model are generated
    If you are only making modifications to an existing database though, you should probably use Change Script as I’ve mentioned in this thread.

Regards,

Lukas

For example:

I created the DL creating a database with all your settings, everything perfect. This system in version 1.01.215

Give a few months there was a need to change a field, it was the logical model and made changes, now the version is 1.01.384, there is the need for a DLL with the creation of the database with new changes from the previous version but also precisadia the DDL with the updates to be made to customers who already Firebird server ran the bank.

How to do it at Toad ???

If I understand correctly, you will need to:

1) Create a new DDL script that includes the changes made in version 1.01.384

Additionally, you can put the SQL query to insert data into the tables into Entity/Model After Script as described here.

2) Generate a Change Script so users who are already using version 1.01.215 can update to 1.01.384

See my answer in your other topic. Don’t forget to use Temporary Tables so the data is preserved when applying the update.

Regards,

Lukas