0

I'm tring to run this SQL query :

select * from openquery(CUIC,'select * from [informix].[agentcalldetailsnapshot]')

I expect a selected table but I have this error message as a result:

Msg 7321, Niveau 16, État 2, Ligne 1 An error occurred while preparing the query "select * from [informix].[agentcalldetailsnapshot]" for execution against OLE DB provider "MSDASQL" for linked server "CUIC".

Thanks for your help !!

Muhammad Vakili
  • 708
  • 4
  • 19
Nes Br
  • 1
  • 2
    If it's a linked server, why not use 4 part naming? `SELECT * FROM [Server].[Database].[Schema].[Table];`? Also, in your query, you appear to be missing the name of the database. – Thom A Jun 20 '19 at 09:17
  • thx for your help I heve tried :select * from openquery(CUIC,'select * from [CUIC].[default].[informix].[agentcalldetailsnapshot]') but it's always the same error – Nes Br Jun 20 '19 at 09:37
  • 2
    That isn't what I said to do, I don't have `OPENQUERY` in the above. – Thom A Jun 20 '19 at 09:37
  • possible duplicate of:https://stackoverflow.com/questions/4091960/sql-server-linked-server-example-query – Atul Mathew Jun 20 '19 at 09:55
  • it still the same error message – Nes Br Jun 20 '19 at 13:19

0 Answers0