Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6745

How to use openquery to populate a HANA table from an SQL Server

$
0
0

Hi,

 

 

I have the following script which I run in SQL Management Studio.

 

insert openquery(HANALINKEDSERVER, 'select "ssn" from "TEST"."testlinked" ') values (10)

 

There is a linked server to HANA named HANALINKEDSERVER.

A table "TEST"."testlinked" exists in HANA with one column named "ssn" of type int.

 

The result is :

 

Msg 7399, Level 16, State 1, Line 1

The OLE DB provider "MSDASQL" for linked server "HANALINKEDSERVER" reported an error. The provider did not give any information about the error.

Msg 7343, Level 16, State 2, Line 1

The OLE DB provider "MSDASQL" for linked server "HANALINKEDSERVER" could not INSERT INTO table "[MSDASQL]". Unknown provider error.

 

 

 

Just to tell you that the environment is correct the following script runs successfully :

select * from openquery(HANALINKEDSERVER, 'select "ssn" from "TEST"."testlinked" ')

 

Thank you in advance.

Dimitris.


Viewing all articles
Browse latest Browse all 6745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>