Click here to Skip to main content
15,900,818 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need a sql query for Access database(metadata.mdb) having more than 100 tables to get the name of all tables starting with "xyz_".

What I have tried:

1.SELECT Name
FROM MSysObjects
WHERE Type=1 AND Flags=0;
But i am getting all tables in the access database, I need only tables starting with name "xyz_".

3.SELECT Name
FROM MSysObjects
WHERE Name LIKE 'xyz_%' OR Name LIKE 'abc_%';
But i am getting no output on run in Access Database even though database have table names starting with "xyz_" and "abc_".
Posted
Updated 2-Oct-16 6:52am
Comments
[no name] 2-Oct-16 6:16am    
WHERE Name LIKE 'xyz_*' OR Name LIKE 'abc_*';

I have no idea why you asked that question...

Seems you haven't read my previous answer[^] carefully.
 
Share this answer
 
This query works-

SELECT Name
FROM MSysObjects
where Name like 'xyz_*';
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900