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 -> Re: Update multiple rows

Re: Update multiple rows

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 26 Mar 2004 18:54:12 -0500
Message-ID: <P8qdnYK1dpNVX_ndRVn-jA@comcast.com>

"xhat" <xhat_at_hotmail.com> wrote in message news:69698e7a.0403261334.58bfadca_at_posting.google.com...
| Ok, I'm still pretty wet behind the ears in relation to Oracle, so I'm
| going to need a bit of leading by the nose.
|
| I've created an associate array of data values using PHP that I need
| to write into an update statement for a table. Call it table A. I
| could make approximately 1,000+ calls (my array is 1042 results) to a
| single row update statement, but that strikes me as wildly
| inefficient. Is there a better way to do this? Can one long SQL
| statement be written that will accomplish the same thing?
|
| Like I said, you'll have to talk slowly to me and use lots of
| pictures. I'm freshly baptised in Oracle and PL/SQL. Thanks in
| advance.

how'boutpassingth'arraytoastoredprocedure'n'us'ntheforallsyntax....

sorry, i'll sloooowww dowwnnnnn....;-)

you could pass the array to a stored procedure and use the FORALL syntax in a single update statement (see the PL/SQL manual for examples) -- not being a PHP programmer, i'm not sure if that can be done directly in PHP's SQL interface

;-{ mcs Received on Fri Mar 26 2004 - 17:54:12 CST

Original text of this message

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