• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a jar library for Java and SQLite to manipulate with currency values (BigDecimal)?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So far I found that SQLite doesn't support BigDecimal,
Is there a library to work around this?
I need a decimal point for currency with 2 trailing cents digits
Thanks
Jack
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Try this fork of the JDBC driver; it specifically adds some support for BigDecimal.


Thanks, let me try it.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello, just wonder what type of fields should be defined for currency values (string or integer)?
and BTW, should I use setBigDecimal or setString or setInt when interfacing with JDBC?

Edit
I know now, I should use VARCHAR, but when comparing amount using having,
say having sum(od.NetSales) > 50000.00
, od is order details, would there be any problems?
just unsure!
Thanks
Jack
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic