|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Returning Database Object names
hey everyone, need some help
I have a query return all the names of the table in my database via this code: SELECT MSysObjects.Name FROM MSysObjects WHERE (((Left([Name],4))<>"MSYS")); I need to further refine the search fitting in the critera LIKE 'qry_tbl%' I dont know how to fit this in .. i tried fitting it in to the end, but nothing comes up.. I also tried querying the results of this query with another query :-P but that didnt work either .. any ideas? In essence i need all the table names in my DB that start with 'qry_tbl' to be in a list for me.. Thx Doc This gives me all the names |
|
#2
|
||||
|
||||
|
wildcard is a * in Access, this should work, change the name to your field name
SELECT MSysObjects.Name FROM MSysObjects WHERE Left([Name],4)<>"MSYS" and name like "tbl_qry*" ; hope it helps. Al |
|
#3
|
|||
|
|||
|
Awesome Al,
It worked, Just curious.. any idea why the % didnt work? arent they equivalent? I guess not if it didnt but just curious why... thx |
|
#4
|
||||
|
||||
|
cool. glad it worked.
queries that you write in access are actually odbc calls i believe. and have different syntax for certain things. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Returning Database Object names |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|