467,923 Members | 1,778 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,923 developers. It's quick & easy.

UDB V8.1 Feature

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
  • viewed: 1113
Share:
6 Replies
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
PS: I also sent you a presentation on that topic by email.

Cheers
Serge
Nov 12 '05 #3
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
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
Pierre, you're address is bouncing...
Nov 12 '05 #6
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.

Similar topics

5 posts views Thread by scsharma | last post: by
4 posts views Thread by christopher diggins | last post: by
18 posts views Thread by Kamen Yotov | last post: by
30 posts views Thread by Raymond Hettinger | last post: by
12 posts views Thread by =?Utf-8?B?RGFyYSBQ?= | last post: by
20 posts views Thread by Luke R | last post: by
10 posts views Thread by Conrad Lender | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.