In addition to excluding system tables (Msys) you might want to include, in the SQL statement, a check to eliminate temporary data files. Temporary data files begin with "~".
I tried yours Roy, but I must be doing something wrong.
"msysobjects" is new to me. I tried that verbatim, then I replaced it with my Database name...neither worked for me.
on the third line, "name" and "msy", I'm not sure about these either. Is name my DB? Since some of this language is new to me, I tried the entire example as is.
[tt]select count(*)
from msysobjects
where left(name,3)<>"msy"
and left(name,1)<>"~"
and type = 1;[/tt]
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.
Erm - query analyser, thats one of the client tools of SQL server, if I'm not mistaken - are you sure you're working with Access? Both queries should work nicely within Access query builder.
For SQL server, I think the statement goes something like
[tt]select name from sysobjects where xtype = 'u'[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.