Groups | Blog | Home
all groups > sql server odbc > october 2003 >

sql server odbc : Seeing Multiple tables from a linked server


Bill Nguyen
10/30/2003 10:50:43 AM
I'm using Dharma ODBC to create a linked server to a databalse residing on
an SCO Unix box. The linked server looks good. However, when I tried to run
select statments (or creating views), the following error messages always
came up:

Server: Msg 7315, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' contains multiple tables that match the name
'bfl_ar_totals'.
OLE DB error trace [Non-interface error: OLE DB provider contains multiple
tables which match the given name: ProviderName='MSDASQL',
TableName='bfl_ar_totals'].

How can I restrict the ODBC to see only single catalogued table?
Thanks
Bill

Bill Nguyen
10/30/2003 5:42:05 PM

This is my sql syntax:

select h.*
from cpro1..dharma.bc h

CPRO1 = linked server name
dharma = catalog
bc = table

The following syntax worked with VIEWs, not tables:

Create View vw_bfl_ar_details as
SELECT bfl.*
FROM cpro1..dharma.bfl_ar_details bfl
go


Any suggestion is greatly appreciated.
Bill

[quoted text, click to view]

Jacco Schalkwijk
10/30/2003 9:02:04 PM
I assume you have to provide the database name and/or the schema/owner name
as well as the table name?

--
Jacco Schalkwijk
SQL Server MVP



[quoted text, click to view]

Jacco Schalkwijk
10/31/2003 9:12:27 AM
Not all databases support the four part naming convention (MySQL is one of
them). You can work around this by setting up a linked server and using
OPENQUERY, for example:
Create View vw_bfl_ar_details as
SELECT <column list>
FROM OPENQUERY(<linked sevrer>, 'SELECT <column list> FROM bfl_ar_details')

If this doesn't help you have to check the documentation for the ODBC driver
and the database you are connecting to.

--
Jacco Schalkwijk
SQL Server MVP


[quoted text, click to view]

AddThis Social Bookmark Button