Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Pro*C and dml returning an unknown number of rows...

Pro*C and dml returning an unknown number of rows...

From: Volker Hetzer <volker.hetzer_at_ieee.org>
Date: Wed, 23 Jun 2004 16:48:10 +0200
Message-ID: <cbc57b$b83$1@nntp.fujitsu-siemens.com>


Hi!

We are struggling with Pro*C regarding the dml returning clause for a multiple row update.
How do I deal with an update of a row set of unknown size? What if the table I want to update with dml returning turns out to have 10 million rows? Can I get a cursor
to fetch from which will give me the returned columns row by row? Also, I can't always use a select afterwards. Consider Table X

EmployeeNumber SalaryGroup
1 1
2 1
3 1
4 1
5 1
6 1
7 2
8 2
9 2

And an
update X set SalaryGroup = 2 where SalaryGroup = 1 returning EmployeeNumber into ...

Now, for an unknown number of employees with salary group 1 how would I find out the updated rows?
Do I really *have* to do a select first and remember the rowids?

Lots of Greetings!
Volker Received on Wed Jun 23 2004 - 09:48:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US