Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2823

Inserting data from Internal Table to External MS SQL Server in Native SQL

$
0
0

Hi Guys ,

 

I need an immediate help.

actually , i have made a connection between my SAP server and MS SQL server.

 

Under which I have to insert multiple records from SAP to SQL Server .

for which i am writing codes in Native  SQL .

 

But it is not inserting records in DB of Sql server.

 

EXEC SQL.

  CONNECT TO 'GAURAV'

ENDEXEC.

 

"----- MY Itab has two records as  of now --------"

LOOP AT ITAB INTO WA.

"---- Insert Command ------"

EXEC SQL.

begin transaction T1  ;

     INSERT INTO Employee( Ename, DateOfBirth, City, sapflag )

      VALUES ( WA-NAME, WA-DATE,WA-CITY,WA-FLAG );

      commit Trabsaction T1;

ENDEXEC.

ENDLOOP.


 

 

 

EXEC SQL.

  DISCONNECT :'GAURAV'

ENDEXEC.

 

Here is the code i have written .

Any help will be deeply appreciated .

 

Thanks & Regards,

Gaurav Singh


Viewing all articles
Browse latest Browse all 2823

Trending Articles



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