Solved

Consultora

Posted on 2016-11-25
3
20 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 28

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

739 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