Listing objects (tables and queries) within a query

J

John Spencer

Do you mean you want to list all the fields in the select clause and all the
tables in the from clause and any additional fields in the where, order by,
group by and having clauses?

No. You can get the list of fields in a Select query. But getting a list of
fields in most other types of queries (update, append, crosstab, etc.) is not
easily done - if it can be done at all.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
J

JimP

Thanks for the reply.

I have a number of queries (out of a 1,000) that have a problem with a join
that involves (2) tables. I'm trying to identify which queries need to be
fixed. However, I don't think listing the objects within a query can be done
except for some type of text search on the qdf.SQL property.

If you can help, the larger issue here is that one of the two tables is a
local MS-Access table and the other is a linked SQL Server db table. The
local table always has lower case codes and the SQL Server table can have a
mixture of codes. Case sensitiviy is enforced on the SQL Server table.
Sometimes the linked records are retrieved, sometimes not and I can't begin
to explain why.

I need to retrieve the matched records somehow.

Jim
 
J

JimP

Thanks for the reply, Alex.

I think what I am trying to do is different and probably can't be done.

I have a number of queries (out of a 1,000) that have a problem with a join
that involves (2) tables. I'm trying to identify which queries need to be
fixed. However, I don't think listing the objects within a query can be done
except for some type of text search on the qdf.SQL property.

If you can help, the larger issue here is that one of the two tables is a
local MS-Access table and the other is a linked SQL Server db table. The
local table always has lower case codes and the SQL Server table can have a
mixture of codes. Case sensitiviy is enforced on the SQL Server table.
Sometimes the linked records are retrieved, sometimes not and I can't begin
to explain why.

I need to retrieve the matched records somehow.

My aplogies for the double-post here
Jim
 
J

JimP

Thanks,

I considered importing the table - this is for report writing onlu so I
don't need to worry about updating any tables.
 
Top