• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

order by with updatable SCROLL_SENSITIVE gives problem

 
Vikram Kamate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am opening a updatable and scrollable resultset on Oracle table. My sql query is simple I am quring single table but I have order by cluase in my query. Query excuted successfuly.
but next() method on resultset gives problem for 10 iteration. then I changed statement.setFetchSize(20) now its giving for problem on 20th if I remove order by it works fine. but I want ordered records.
some buddy suggested.
SELECT AGENT_CLIENT_ID, LAST_CYCLE_DATE
from (select AGENT_CLIENT_ID, LAST_CYCLE_DATE from commission_detail order by AGENT_CLIENT_ID)
but then update dosent work.
please help me.
thankx in advance
Vikram
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What problem do you get? Does it fail silently or do you get an exception -- and if you get an exception, can you post stack trace, SQL error code and SQL state?
- Peter
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty sure you can't update using a join or correlated subquery. This means that it would not be possible to create an updateable resultset using a query that contains one.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic