Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2004

Tip: Looking for answers? Try searching our database.

Using updateRow() in select ... order by

Thread view: 
Scorpio - 27 Jan 2004 20:44 GMT
Hi newsgroup,

I've encountered a problem with db2/as400.

I need do update rows in a resultset returned from a query "Select * from
table order by field", but it seems that db2/as400 does not support
updatable resultset from select with order by clause.

Did anybody else encounter this problem?
Any suggestions ?

Scorpio.
Joe Weinstein - 27 Jan 2004 21:14 GMT
> Hi newsgroup,
>
[quoted text clipped - 8 lines]
>
> Scorpio.

Hi. This is expectable. Many order-by queries may actually require the
DBMS to copy the table data to a temporary area to sort, and so the
actual table data is not even returned to the client, but is returned
from that temp copy. It is typically a complicated idea to ask the DBMS
to trace the row from the client to the copy and then back to the original
table row, and they typically don't do it. In fact some DBMSes free the
temp memory holding the sorted data as soon as it is returned to the
client. I suggest you make a separate update statement to change a row,
and use it whenever you find a row in the query that you want to change.
Getting updateable result sets is typically inefficient.
Joe Weinstein at BEA
Scorpio - 28 Jan 2004 19:45 GMT
> Hi. This is expectable. Many order-by queries may actually require the
> DBMS to copy the table data to a temporary area to sort, and so the
[quoted text clipped - 6 lines]
> and use it whenever you find a row in the query that you want to change.
> Getting updateable result sets is typically inefficient.

Thank you for your answer. The problem is I want to lock some rows, and
ordering it's important because i have to put data from "subset" of rows
into different XML document. I'll have to create a more complicated
procedure to lock the data and process them  group by group while locks are
mantained.

Scorpio.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.