I was right.  I got the tables done before a response.  But still would
like to know if there's a SQLite method of doing so.

My method was to use a templating application that I wrote at work. I give
it this variable declaration:

Name=Resource

I then give it this text:

CREATE TABLE [%(Name)s]( [%(Name)ID] INTEGER PRIMARY KEY AUTOINCREMENT,
[%(Name)Name] CHAR NOT NULL, UNIQUE([%(Name)Name]));
CREATE UNIQUE INDEX [u%(Name)Name] ON [%(Name)s]([%(Name)Name]);

It then gives me this result:

CREATE TABLE [Resources]( [ResourceID] INTEGER PRIMARY KEY AUTOINCREMENT,
[ResourceName] CHAR NOT NULL, UNIQUE([ResourceName]));
CREATE UNIQUE INDEX [uResourceName] ON [Resources]([ResourceName]);

Repeat for each simple table I want, and things were done in just a couple
of minutes.  Its a very basic template engine (Automatic Search & Replace
until no keyword strings exist), but it takes big chunks of time off when
we do upgrades to our 100+ servers around the world.

BUT, if I could have the SQL version be provided a list of names, it goes
and loops through repeating whatever processes I need based on that name
for that loop, and creates the structures I'd need later on in life. ;)
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to