Board index » delphi » DDL calling another DDL

DDL calling another DDL


2006-12-13 03:46:37 AM
delphi143
Does anyone have an idea of how to have a DDL calling 1 or more DDLs? I
have a few DDLs that create the databases/tables, but I also have some
SQL statements to insert the data from another file. I am not speaking
of Bulk insert. My secondary file is a bunch of INSERT INTOS table
(some field names) values (some values). I would like to have my one DDL to
create the tables and then execute my files to insert the data. With
out running this manually everytime.
Any ideas????
TIA
 
 

Re:DDL calling another DDL

You might get away with executing a procedure from your initial script. Just
take the Insert Intos and place them in a stored proc and use exec in the
original script.
This assumes your inserts are static, though.
--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"scoots987" <XXXX@XXXXX.COM>writes
Quote
Does anyone have an idea of how to have a DDL calling 1 or more DDLs? I
have a few DDLs that create the databases/tables, but I also have some
SQL statements to insert the data from another file. I am not speaking
of Bulk insert. My secondary file is a bunch of INSERT INTOS table
(some field names) values (some values). I would like to have my one DDL to
create the tables and then execute my files to insert the data. With
out running this manually everytime.

Any ideas????

TIA

 

Re:DDL calling another DDL

Quote
Does anyone have an idea of how to have a DDL calling 1 or more DDLs? I
have a few DDLs that create the databases/tables, but I also have some
SQL statements to insert the data from another file. I am not speaking
of Bulk insert. My secondary file is a bunch of INSERT INTOS table
(some field names) values (some values). I would like to have my one DDL to
create the tables and then execute my files to insert the data. With
out running this manually everytime.

Any ideas????
Depending on the database engine and the script runner, some allow
scripts to call other scripts.
--
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
www.upscene.com
My thoughts:
blog.upscene.com/martijn/
Database development questions? Check the forum!
www.databasedevelopmentforum.com
 

Re:DDL calling another DDL

Try using dbConstructor to generate your DDL scripts it is easy to create the
kind of scripts that you are describing.
Robert Allen Schambach
www.dbconstructor.com
"scoots987" <XXXX@XXXXX.COM>writes
Quote
Does anyone have an idea of how to have a DDL calling 1 or more DDLs? I
have a few DDLs that create the databases/tables, but I also have some
SQL statements to insert the data from another file. I am not speaking
of Bulk insert. My secondary file is a bunch of INSERT INTOS table
(some field names) values (some values). I would like to have my one DDL to
create the tables and then execute my files to insert the data. With
out running this manually everytime.

Any ideas????

TIA