Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2006

Tip: Looking for answers? Try searching our database.

Multi-Row Inserts on DB2 for zOS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
geoff - 08 Jan 2006 04:23 GMT
I have a table called 'employee' with one column called 'name', a varchar.
If I execute the following insert statements:

insert into employee(name) values ('jones')
insert into employee(name) values ('smith')
insert into employee(name) values ('billy-bob')

. . . they work, no problem.  If I execute the following:

insert into employee(name) values ('jones'),('smith'),('billy-bob')

. . . I get an error which says the comma after ('jones') is an unexpected
token.  However, this works on db2 for other platforms.  I am using db2 v8.1
on zOS from an xp client connected through cli.  Any reason why the above
statement would not work on db2 for zOS?

Thanks.

-g
Serge Rielau - 08 Jan 2006 04:56 GMT
> I have a table called 'employee' with one column called 'name', a varchar.
> If I execute the following insert statements:
[quoted text clipped - 11 lines]
> on zOS from an xp client connected through cli.  Any reason why the above
> statement would not work on db2 for zOS?
Not supported on DB2 for zOS. If you're goin in through CLI, take a look
at array/buffered inserts.

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab

geoff - 08 Jan 2006 07:07 GMT
> Not supported on DB2 for zOS. If you're goin in through CLI, take a look
> at array/buffered inserts.

. . . but with an array insert, say, 10 values, it executes 10 insert
statements, right?

-g
Serge Rielau - 08 Jan 2006 12:15 GMT
>>Not supported on DB2 for zOS. If you're goin in through CLI, take a look
>>at array/buffered inserts.
>
> . . . but with an array insert, say, 10 values, it executes 10 insert
> statements, right?
That is correct from the SQL point of view
But there is only one flow from the client to the server.
It's as if the INSERTs executed within a procedure.

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.