I am trying to run a query that allows me to take the right 6 characters of the table name and insert them into a field within the table.
Doug Steele
Feb 5 2007, 03:47 PM
You're going to have to hard-code the 6 characters: I don't believe there's any way in a query to get access to the table's name.
doctor9
Feb 5 2007, 04:02 PM
This query will give you the list of table names:
SELECT MSysObjects.Name AS nm, MSysObjects.Database
FROM MSysObjects
WHERE (((MSysObjects.Database) Is Not Null));
It also lists the path/name of the database file that the table resides in. I use it to manage tables linked from multiple databases.
Dennis
Doug Steele
Feb 5 2007, 04:58 PM
While you can get the information about the tables in an application from MSysObjects, I don't think that's what MCK is looking for.
I'm assuming he/she wants to be able to put the last 6 characters of a particular table as a field in that table.
doctor9
Feb 5 2007, 05:11 PM
MCK,
Firstly, welcome to UtterAccess! (Um, a little belated, I admit.)
Secondly, can you be more specific about what you are doing with an example?
That way we can better help you accomplish your task.
Dennis
truittb
Feb 5 2007, 06:32 PM
Welcome to Utter Access.
What you want to do begs the question why? Do you have multiple tables with the same structure?
Let us know why you need to do what you are asking.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.