MS Query error Could not add the table

K

KHanna

I get the error "Could not add the table
'\\lth01pc354\c$\Logs\History\TEST.CSV)' when running this subquery on an
external data source:

SELECT BEMIS_BAGGER_RATE AS 'RATE', (SELECT Avg(Val(BEMIS_BAGGER_RATE)) FROM
\\lth01pc354\c$\Logs\History\TEST.CSV) AS 'AVERAGE'
FROM \\lth01pc354\c$\Logs\History\TEST.CSV

What am I doing wrong?
 
P

Puppet_Sock

KHanna said:
I get the error "Could not add the table
'\\lth01pc354\c$\Logs\History\TEST.CSV)' when running this subquery on an
external data source:

SELECT BEMIS_BAGGER_RATE AS 'RATE', (SELECT Avg(Val(BEMIS_BAGGER_RATE)) FROM
\\lth01pc354\c$\Logs\History\TEST.CSV) AS 'AVERAGE'
FROM \\lth01pc354\c$\Logs\History\TEST.CSV

What am I doing wrong?

Do you have all the appropriate permissions and write capabilities?

Is the URL correct?

I can't debug your sql for you. It's been a while.

Can you do *any* sql through this link? Say you do the simplest
possible
select you can construct. Say, something like so. (Or whatever simple
select should work.)

SELECT BEMIS_BAGGER_RATE
FROM \\lth01pc354\c$\Logs\History\TEST.CSV

Does that work?

That is, do the standard thing when something is broken. Try to do
something as simple as you can and thus clear away complexity
to uncover the source of the problem.
Socks
 
K

KHanna

I finally got it to work using:
SELECT Bemis.`$Date`, Bemis.`$Time`, Bemis.BEMIS_BAGGER_RATE,
Avg(Int(TEST.BEMIS_BAGGER_RATE))
FROM `\\lth01pc354\c$\Logs\History`\TEST.CSV Bemis,
`\\lth01pc354\c$\Logs\History`\TEST.CSV TEST
GROUP BY Bemis.`$Date`, Bemis.`$Time`, Bemis.BEMIS_BAGGER_RATE

Thanks for the effort.
 
Top