Importing data via an external database query

R

rtiguy

The following query works fine using Access:

SELECT PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME,
PMC_VAR_MELT_INFORMATION.COOL_STOP_TIME
FROM ((PMC_VAR_HEAT_INFORMATION INNER JOIN PMC_VAR_ELECTRODE_INFORMATION ON
PMC_VAR_HEAT_INFORMATION.HEAT_ID = PMC_VAR_ELECTRODE_INFORMATION.HEAT_ID)
INNER JOIN PMC_VAR_MELT_INFORMATION ON
PMC_VAR_ELECTRODE_INFORMATION.ELECTRODE_ID =
PMC_VAR_MELT_INFORMATION.ELECTRODE_ID) INNER JOIN [Electrode first and last
melt ID] ON PMC_VAR_MELT_INFORMATION.MELT_ID = [Electrode first and last melt
ID].Melt_ID
WHERE ((("8"+Mid$([PMC_VAR_HEAT_INFORMATION.HEAT_NUMBER],2,1))=85))
ORDER BY PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME;

If I try to create the same query in Excel by copying the SQL statement from
Access, Excel displays the message: Could not add table
'((PMC_VAR_HEAT_INFORMATION'

Is this statement too complex for an Excel query?

Any suggestions would be appreciated.

Thanks.
 
I

IanC

I'm guessing here.

PMC_VAR_MELT_INFORMATION is a table in the Access database where you wrote
(and executed) the original query.

I suspect the problem is that Excel has no idea where to find this table.
 
R

rtiguy

PMC_VAR_MELT_INFORMATION is an external Oracle table. In Excel I use the same
ODBC data source that I use in Access to connect to the Oracle database so it
can find the table. A simple select query on this table using Excel works
correctly.

IanC said:
I'm guessing here.

PMC_VAR_MELT_INFORMATION is a table in the Access database where you wrote
(and executed) the original query.

I suspect the problem is that Excel has no idea where to find this table.

--
Ian
--
rtiguy said:
The following query works fine using Access:

SELECT PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME,
PMC_VAR_MELT_INFORMATION.COOL_STOP_TIME
FROM ((PMC_VAR_HEAT_INFORMATION INNER JOIN PMC_VAR_ELECTRODE_INFORMATION
ON
PMC_VAR_HEAT_INFORMATION.HEAT_ID = PMC_VAR_ELECTRODE_INFORMATION.HEAT_ID)
INNER JOIN PMC_VAR_MELT_INFORMATION ON
PMC_VAR_ELECTRODE_INFORMATION.ELECTRODE_ID =
PMC_VAR_MELT_INFORMATION.ELECTRODE_ID) INNER JOIN [Electrode first and
last
melt ID] ON PMC_VAR_MELT_INFORMATION.MELT_ID = [Electrode first and last
melt
ID].Melt_ID
WHERE ((("8"+Mid$([PMC_VAR_HEAT_INFORMATION.HEAT_NUMBER],2,1))=85))
ORDER BY PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME;

If I try to create the same query in Excel by copying the SQL statement
from
Access, Excel displays the message: Could not add table
'((PMC_VAR_HEAT_INFORMATION'

Is this statement too complex for an Excel query?

Any suggestions would be appreciated.

Thanks.
 
I

IanC

Like I said, I was guessing.

Hopefully someone else can help you with this.

--
Ian
--
rtiguy said:
PMC_VAR_MELT_INFORMATION is an external Oracle table. In Excel I use the
same
ODBC data source that I use in Access to connect to the Oracle database so
it
can find the table. A simple select query on this table using Excel works
correctly.

IanC said:
I'm guessing here.

PMC_VAR_MELT_INFORMATION is a table in the Access database where you
wrote
(and executed) the original query.

I suspect the problem is that Excel has no idea where to find this table.

--
Ian
--
rtiguy said:
The following query works fine using Access:

SELECT PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME,
PMC_VAR_MELT_INFORMATION.COOL_STOP_TIME
FROM ((PMC_VAR_HEAT_INFORMATION INNER JOIN
PMC_VAR_ELECTRODE_INFORMATION
ON
PMC_VAR_HEAT_INFORMATION.HEAT_ID =
PMC_VAR_ELECTRODE_INFORMATION.HEAT_ID)
INNER JOIN PMC_VAR_MELT_INFORMATION ON
PMC_VAR_ELECTRODE_INFORMATION.ELECTRODE_ID =
PMC_VAR_MELT_INFORMATION.ELECTRODE_ID) INNER JOIN [Electrode first and
last
melt ID] ON PMC_VAR_MELT_INFORMATION.MELT_ID = [Electrode first and
last
melt
ID].Melt_ID
WHERE ((("8"+Mid$([PMC_VAR_HEAT_INFORMATION.HEAT_NUMBER],2,1))=85))
ORDER BY PMC_VAR_MELT_INFORMATION.ARC_STRIKE_TIME;

If I try to create the same query in Excel by copying the SQL statement
from
Access, Excel displays the message: Could not add table
'((PMC_VAR_HEAT_INFORMATION'

Is this statement too complex for an Excel query?

Any suggestions would be appreciated.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top