Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Checking for tables
Wed, Apr 18 2007 3:00 PMPermanent Link

"Lance R"
I'm adding a DB using the query on the configuration and now I need to check
if the tables were created.

SELECT * FROM Information.Tables WHERE Name='TableVersion'

I would assume that if rows > 0 than the creation of tables was sucessfull .
I know it would be even better if I check EACH table.

The question would be... what if I have Database1 with a table name
"TableVersion" and Database2 has a table name "TableVersion".

How would I check this?

Lance







Wed, Apr 18 2007 5:19 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Lance,

<< The question would be... what if I have Database1 with a table name
"TableVersion" and Database2 has a table name "TableVersion". >>

Just loop through the Configuration.Databases table and assign the database
name from each row to your query of the Information schema for each
database.   Or you could simply set up a master-detail query with the
Databases table/query as the driver data source.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 18 2007 5:24 PMPermanent Link

"Lance R"
If I'm concentric with one database, would this work?

SELECT * FROM Configuration.Databases,  Information.Tables WHERE
Information.Tables.Name='TableVersion' and
Configuration.Databases.Name='DATABASE1'

Lance


"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:0BDD584E-C134-4050-BE40-8FD56DCFF836@news.elevatesoft.com...
> Lance,
>
> << The question would be... what if I have Database1 with a table name
> "TableVersion" and Database2 has a table name "TableVersion". >>
>
> Just loop through the Configuration.Databases table and assign the
> database name from each row to your query of the Information schema for
> each database.   Or you could simply set up a master-detail query with the
> Databases table/query as the driver data source.
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Image