Blackhorse said:
Excel and Access differ in the way SQL looks at tables to pull information
from a database. Why are these not interchangeable so the same statement can
be used in both.
I don't get what you mean. When the data source is Excel, the SQL
engine is Jet, which what I assume you mean by 'Access'. Assuming the
same version of Jet (engine and provider/driver) then the syntax should
be the interchangeable between Excel and MS Access. The way Jet
identifies tables and data types is different for Excel but this is a
practical necessity rather that a syntax deviation. Please give an
example of non-interchangeable syntax.
P.S. I've just had a thought: when you say 'Excel' do you mean MS
Query? MS Query was designed to be used with a variety of data sources,
not just MS Jet/Access. It has its own quirky SQL syntax so it can
support its own functionality, most notably parameters (I suppose so it
can parse the SQL easily for the ? placeholders). If you don't like the
syntax you can alternatively use SQL that is used by your data source
(e.g. Jet SQL) and it should be passed untouched to the source to be
executed there. However, when you do this you lose MS Query
functionality such as parameters.
Jamie.
--