I was sent here from the MS Access forum. Hope this is where I should be. (my statements are within quotes, the others are the answers I received.
"I can query a specific table, however I want to be able just to know how many tables are in a specific database.
Any ideas? thanks"
select count(*)
from msysobjects
where left(name,3)<>"msy"
and left(name,1)<>"~"
and type = 1;
This you should be able to paste directly into the sql view of a query (last one had one closing parens to much, and missed temp tables, as mentioned by FancyPrairie). Access will probably add some [brackets]. Msysobjects is one of the system tables that is normally not visible in the database. In tools | options - view tab, check System Tables, to be able to see them. Msysobjects contains information on all the main objects of the database.
"I tried Roy's and PHV's code, and I get the same error on both scripts.
msg 208 - Invalid object name 'msysobjects'
I'm running this from the SQL Query Analyzer"
So don't ask in an Access forum but in a SQL Server one ...
"thanks
"I can query a specific table, however I want to be able just to know how many tables are in a specific database.
Any ideas? thanks"
select count(*)
from msysobjects
where left(name,3)<>"msy"
and left(name,1)<>"~"
and type = 1;
This you should be able to paste directly into the sql view of a query (last one had one closing parens to much, and missed temp tables, as mentioned by FancyPrairie). Access will probably add some [brackets]. Msysobjects is one of the system tables that is normally not visible in the database. In tools | options - view tab, check System Tables, to be able to see them. Msysobjects contains information on all the main objects of the database.
"I tried Roy's and PHV's code, and I get the same error on both scripts.
msg 208 - Invalid object name 'msysobjects'
I'm running this from the SQL Query Analyzer"
So don't ask in an Access forum but in a SQL Server one ...
"thanks