• Post Reply Bookmark Topic Watch Topic
  • New Topic

rownum is always 1 for all records!  RSS feed

 
Ravi Tiruvaipati
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I am trying to access rownum (predefined column for all tables in Oracle) from java code and for some reason it is always 1 (number) for all the records in the resultset. Here is the query I am tring...

When I try the same sql statement in oracle, it does returns unique values for rownum. I dont understand why the same query doesn't work when tried from java.
appreciate your help.
regards
ravi
[ September 30, 2003: Message edited by: Ravi Tiruvaipati ]
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravi
I think this is something to do with the ResultSet.
Replace

to

and give a try
---------------
Sainudheen
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!