IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Multi Row Insert in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Fri Jan 17, 2014 10:15 am
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: 1281
Location: Belgium

PostPosted: Tue Jan 21, 2014 8:50 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
Search our Forums:

Back to Top