Re: help with tables
- From: docdwarf@xxxxxxxxx ()
- Date: Wed, 30 Jan 2008 18:42:51 +0000 (UTC)
In article <47A053E0.6F0F.0085.0@xxxxxxxxxxxxxx>,
Frank Swarbrick <Frank.Swarbrick@xxxxxxxxxxxxxx> wrote:
<15ovp3p40dmvcovmgc3co257gi595dn3ii@xxxxxxx>, Robert<no@xxxxxx> wrote:On 1/29/2008 at 9:37 PM, in message
If you don't like BULK COLLECT syntax, leave it out. Selecting into an
array does the
same thing and isn't tied to Oracle. It works on DB2 the same way. For
example:
01 table2-area.
05 table2-entry occurs 1 to 100 depending on sqlerrd (3).
10 t2-name pic x(30).
10 t2-dept pic x(04).
compute sqlerrd(3) = length of table2-area / length of table2-entry
select name, department into table2-entry from table2
where name in (select distinct name from table1)
display 'There are ' sqlerrd(3) ' departments.'
This does not appear to work, at least not using the DB2 pre-processor.
Oh, these silly 'professionals' and their demands that things do stuff
like... *work*. I seem to recall that in DB2 there's a specific SQLcode
that comes back if more than one row in a table satisfies the criteria of
a given SELECT.
Some folks would get rather upset when they saw this... I've seen it turn
a fellow from a genial, clean-talking guy into quite the curse-er.
DD
.
- References:
- Re: help with tables
- From: Frank Swarbrick
- Re: help with tables
- Prev by Date: Re: OT: Racial superiority / Intelligent design was Re: OT:Thanksgiving
- Next by Date: Re: OT: Racial superiority / Intelligent design was Re: OT:Thanksgiving
- Previous by thread: Re: help with tables
- Next by thread: Re: help with tables
- Index(es):
Relevant Pages
|