As it turns out, it is entirely possible to nest scripts to multiple levels.

For instance I now have:

Create_And_Load_Tables.sql
-----------------------------------
\. Create_Tables.sql
\. Load_Tables.sql
-----------------------------------

Create_Tables.sql
-----------------------------------
\. Create_Locale.sql
\. Create_Labels.sql
\. Create_Ref.sql
\. Create_Ref_Rels.sql
-----------------------------------

Load_Tables.sql
-----------------------------------
\. Load_Locale.sql
\. Load_Labels.sql
\. Load_Ref.sql
\. Load_Ref_Rels.sql
-----------------------------------

Any of the scripts mentioned in this note can be run directly from the MySQL command line. Running a nested script invokes all of the scripts named within it.

This is really going to help me; I'm glad we figured this out!

Rhino

----- Original Message ----- From: "Dirk Bremer" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>; "mysql" <mysql@lists.mysql.com>
Sent: Monday, January 16, 2006 10:29 AM
Subject: RE: Nested scripts in MySQL?



-----Original Message-----
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Monday, January 16, 2006 09:10
To: mysql
Subject: Nested scripts in MySQL?

Is it possible to run nested scripts in MySQL?


I tried this with success. Create a file that contains lines like this:

\. today.sql
\. status.sql
\. active.sql

Save this file. Execute this file from the client. I did not try nesting
more than this example (1-level), but suppose it would work for more.
Note that the '\.' equates to the 'source' command.

Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO
- USA Central Time Zone
636-755-2652 fax 636-755-2503

[EMAIL PROTECTED]
www.nisc.coop

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14/01/2006




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 14/01/2006


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to