Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the best way to update multiple rows.

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all.

I need to update 3 fields on a table with different values that the user selects. There can be between 1-400 rows. I will need one UPDATE clause for each row because the user selects them at random. So, basically, I'll loop through each row that the user selects and execute a sql update for each. I can do this either in ASP or through a stored procedure. Which is the fastest way? I assume it would be faster with the stored procedure, but only if I can pass all the values at once with some kind of array. What is your opinion? I've never worked with arrays in Oracle, so how would I do that?

Thanks :)

Steve
 
There is no easy way for the stored procedure solution.
Look at
Any way, updating directly via ASP will result in a more maintainable and easy to read application. That's often more important than unreadable and difficult to understand solutions (which (at least I think) are fun to develop). Well, in this case, a parameterized solution would not be that difficult. If only it was supported.

Bart.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top