• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 25
  • Last Modified:

Consultora

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
Mónica Fernandes
Asked:
Mónica Fernandes
  • 2
1 Solution
 
Pawan KumarDatabase ExpertCommented:
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
 
Mónica FernandesAuthor Commented:
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
 
Mónica FernandesAuthor Commented:
Work
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now