Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Multi Row Insert in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Fri Jan 17, 2014 7:34 am    Post subject: Multi Row Insert in DB2
Reply with quote

Hi,
I'm trying to insert multi-rows using the below query
Code:

INSERT INTO TABLEA
(COL1,COL2,COL3,COL4....COL9)
VALUES
(VAL11,VAL12,VAL13,VAL14,.....VAL19),
(VAL21,VAL22,VAL23,VAL24,.....VAL29),
(VAL31,VAL32,VAL33,VAL34,.....VAL39),
(VAL41,VAL42,VAL43,VAL44,.....VAL49);


But i'm receiving error
Code:

DSNT408I SQLCODE = -104, ERROR:  ILLEGAL SYMBOL ",". SOME SYMBOLS THAT MIGH
         BE LEGAL ARE: FOR <END-OF-STATEMENT> NOT ATOMIC                   
DSNT418I SQLSTATE   = 42601 SQLSTATE RETURN CODE                           
DSNT415I SQLERRP    = DSNHPARS SQL PROCEDURE DETECTING ERROR               
DSNT416I SQLERRD    = 3 0  0  -1  380  502 SQL DIAGNOSTIC INFORMATION     
DSNT416I SQLERRD    = X'00000003'  X'00000000'  X'00000000'  X'FFFFFFFF'   
         X'0000017C'  X'000001F6' SQL DIAGNOSTIC INFORMATION               


I tried by using the FOR n ROWS option also still the same error.[/code]
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Fri Jan 17, 2014 10:15 am    Post subject:
Reply with quote

Hi,

Would suggest you to read the manual and understand MULTI row insert
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1280
Location: Belgium

PostPosted: Tue Jan 21, 2014 8:50 pm    Post subject:
Reply with quote

yep, although valid on LUW this does not (yet) work on zOS
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts Reading selected volumes of a multi-v... RickBig JCL & VSAM 6 Wed Jul 13, 2016 7:26 pm
No new posts How do I right justify a string in an... rakesh17684 DB2 1 Wed Jun 08, 2016 8:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us