?
Solved

Consultora

Posted on 2016-11-25
3
Medium Priority
?
22 Views
Last Modified: 2016-11-30
Hello,
I need Insert multiple records into AS400 database. In SQL I put ; in the end of statment but in AS400 I don't know what to put

INSERT INTO M3FDBTST.FCHACC (EACONO, EADIVI, EAAITP, EAAITM, EAAICL, EATX40, EATX15, EAAT01) VALUES ('901', '002', '3', '115', '', 'PAGAMENTOS P/ TRANSFER. BANCÁRIA', 'PAGAMENTOS P/ T', '0');
INSERT INTO M3FDBTST.FCHACC (EACONO, EADIVI, EAAITP, EAAITM, EAAICL, EATX40, EATX15, EAAT01) VALUES ('901', '002', '3', '1151', '', 'PAGAMENTOS P/ TRANSFERÊNCIA - BE', 'PAGAMENTOS P/ T', '0');

Can you help me please.

Thank you

Mónica
0
Comment
Question by:Mónica Fernandes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Expert Comment

by:Pawan Kumar
ID: 41901520
Try..

exec sql 
INSERT INTO M3FDBTST.FCHACC (EACONO, EADIVI, EAAITP, EAAITM, EAAICL, EATX40, EATX15, EAAT01) 
VALUES ('901', '002', '3', '115', '', 'PAGAMENTOS P/ TRANSFER. BANCÁRIA', 'PAGAMENTOS P/ T', '0');

exec sql 
INSERT INTO M3FDBTST.FCHACC (EACONO, EADIVI, EAAITP, EAAITM, EAAICL, EATX40, EATX15, EAAT01) 
VALUES ('901', '002', '3', '1151', '', 'PAGAMENTOS P/ TRANSFERÊNCIA - BE', 'PAGAMENTOS P/ T', '0');

Open in new window

0
 

Accepted Solution

by:
Mónica Fernandes earned 0 total points
ID: 41901682
Thank you,  but don't work:

Error: SQL0104 - Token EXEC was not valid. Valid tokens: ( CL END GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER. (State:37000, Native Code: FFFFFF98)

I found another  way:

INSERT INTO M3FDBTST.FCHACC (EACONO, EADIVI, EAAITP, EAAITM, EAAICL, EATX40, EATX15, EAAT01)
 VALUES ('901', '002', '3', '1411', '', 'POTENCIALMENTE FAVORÁVEIS', 'POTENCIALMENTE ', '0') UNION ALL
 VALUES ('901', '002', '3', '14111', '', 'SWAP S DE COBERTURA', 'SWAPS DE COBER', '0') UNION ALL
 VALUES ('901', '002', '3', '1411101', '', 'SWAP  9401 - 01-12-2006', 'SWAP  9401 - 01', '0')

thank you
0
 

Author Closing Comment

by:Mónica Fernandes
ID: 41907015
Work
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question