Link to home
Start Free TrialLog in
Avatar of hccfsa
hccfsaFlag for United States of America

asked on

skipping sys* tables in a query

Hello,

I'm trying to do a query to select all user tables and apparently SQL server marks system tables like sysarticles and sysdiagrams as user tables. "WHERE ObjectProperty(sysobjects.id,'IsSystemTable') = 0" or "WHERE sysobjects.xtype = 'U'" just don't do. I can't filter by the table names also, because we have many tables that start with "sys". So any suggestions? Thank you very much.
ASKER CERTIFIED SOLUTION
Avatar of appari
appari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hccfsa

ASKER

Hehe, why didn't I think of that lol. Thanks. That's exactly what I was looking for.