aspose file tools*
The moose likes JDBC and the fly likes rownum is always 1 for all records! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "rownum is always 1 for all records!" Watch "rownum is always 1 for all records!" New topic
Author

rownum is always 1 for all records!

Ravi Tiruvaipati
Greenhorn

Joined: Aug 27, 2003
Posts: 13
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

Joined: Aug 18, 2003
Posts: 218
Hi Ravi
I think this is something to do with the ResultSet.
Replace

to

and give a try
---------------
Sainudheen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: rownum is always 1 for all records!