By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,589 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,589 IT Pros & Developers. It's quick & easy.

UDB V8.1 Feature

P: n/a
I would like to store the select statement values in to a table by
using the SELECT FROM INSERT. For example,

insert into taddress_next
(select beneficiary_id,address_line1_tx from
NEW TABLE (
insert into qcpi039.taddress_benes (
beneficiary_id,address_line1_tx)
values
(12345632,'NewAddress')
))

It doesn't work. Is it possible to do this in V8.1
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Couple of small changes:

WITH I1 AS (select beneficiary_id,address_line1_tx from
NEW TABLE (
insert into qcpi039.taddress_benes (
beneficiary_id,address_line1_tx)
values
(12345632,'NewAddress'))
select count(1) FROM
NEW TABLE(insert into taddress_next
select beneficiary_id,address_line1_tx
from i1

Background:
To avoid read/write conflict issues DB2 forces series of
updates/inserts/deletes to be sorted using WITH.
Since WITH is in DB2 only allowed as part of select statement
you need to add this outer SELECT.

Cheers
Serge
Nov 12 '05 #2

P: n/a
PS: I also sent you a presentation on that topic by email.

Cheers
Serge
Nov 12 '05 #3

P: n/a
In article <2s*************@uni-berlin.de>, Serge Rielau
(sr*****@ca.ibm.com) says...
PS: I also sent you a presentation on that topic by email.

Cheers
Serge


I'm also interested in your presentation. Cna we also find it on the
Developers Domain or another website.

TIA.
Nov 12 '05 #4

P: n/a
I have long meant to turn the presentation into a developer domain
article, but I kept getting pre-empted
If you send me an email I'll fire back the presentation.

Cheers
Serge
Nov 12 '05 #5

P: n/a
Pierre, you're address is bouncing...
Nov 12 '05 #6

P: n/a
Serge Rielau <sr*****@ca.ibm.com> wrote in message news:<2s*************@uni-berlin.de>...
Pierre, you're address is bouncing...


Serge,
Thanks for the help. Please send the doc to su****@aol.com
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.