This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BigDecimal question

 
Red Green
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.math.BigDecimal gotNum = rs.getBigDecimal("someNumericValue");
 
Paul Stevens
Ranch Hand
Posts: 2823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D
 
Red Green
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am sorry about the initial posting, i guess i didn't do a full copy before my cut and paste. anyway the question is: is this the correct format to get the numeric value from the recordset?
java.math.BigDecimal gotNum = rs.getBigDecimal("someNumbericValue");
 
saravanan balu
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
when you say the column value is numeric you can use rs.getInt("columnName") also, it depends upon the column's datatype.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan balu,

You might notice that the date of the initial post is from almost three years ago.

----

Red Green,

Should you ever return...

Welcome back to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!

----

Moving this to the JDBC forum...
[ June 10, 2004: Message edited by: Dirk Schreckmann ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic