Is it possible to select fields from two tables where the field names are equal?
I know that the field data types are all the same but I want to make a query that contains data where the field names are the same in both tables.
Vince
Sorry for not being clear but I wouldn't know what the field names would be.
My guess is that this isn't possible simply using SQL but I can do it using procedural code in Access (VBA), which is what I am working on now.
Thanks anyway.
Vince
Well, I do a similar thing all the time. But it's a web based application. When someone creates a "Document Type", it creates the appropriate tables (which I don't know the name of ahead of time) and then it creates Fields (which I don't know ahead of time either).
What I do is to put the names into a table that I call "TableDef". In there I store all the names of the fields and the tables that they go to as well as the data types that the fields are, ie. integer, character, length(when appropriate), etc.
Hope that helps
_______
I love small animals, especially with a good brown gravy....
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.