Teradata Open Query syntax

Database
N/A

Teradata Open Query syntax

 SELECT 
*
from openquery ([LPWVD4237,11210] , '
SELECT
lm.process_date,
lm.lm_client
, lm.lm_loan,
lm.LM_SPOCID
, lm.LM_SPOC_Name,
lm.[LM Status] as LM_Status
,lm.[lm removal dt] as LM_Removal_Dt
from loss_mit..LM_Inventory_History lm
where lm.lm_loan IN (''0633812755'')
  and lm.[LM Status] IN (''R'') ' )
  

Hello i have  a open query wherein i am trying to access sql server from teradata using open query - Quesy works fine in sql server. Getting an error - syntax error, expected something between word OPENQUERY and '(' . Could anybody know what i am missing.

Thanks,

3 REPLIES
N/A

Re: Teradata Open Query syntax

OPENQUERY is MS SQL Server syntax, which is not supported in Teradata.

N/A

Re: Teradata Open Query syntax

Dieter Can you tell me how do I use a linked server then ? .. i want to access SQL server from teradata. Thanks

N/A

Re: Teradata Open Query syntax

Teradata simply doesn't support linked servers (In TD15 there's something similar, named QueryGrid, but this doesn' support SQL Server, yet)