This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Parse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Parse?" Watch "Parse?" New topic
Author

Parse?

Robin Richardson
Ranch Hand

Joined: Mar 01, 2001
Posts: 37
I need to change data from one database to another. The field in one database is in decimal format but the other database is expecting a varchar. Is the best way to handle this by parsing, or is there a better way? any examples?
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
A decimal should fit in a varchar with no problem. Are you sure you need to do anything?


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
OK, I guess you would need to truncate any extra decimal places that might be there. If you run in through BigDecimal it will take the length parameter and round that for you.
Robin Richardson
Ranch Hand

Joined: Mar 01, 2001
Posts: 37
I am getting an error that states : fetch out of sequence
I am sending info from one database to another. According to the Oracle error messages it has to do with something not being parsed before something else happens.
I'm not sure what I am looking for in this program, any suggestions on where to look ?
Thanks
Robin
Robin Richardson
Ranch Hand

Joined: Mar 01, 2001
Posts: 37
Oh, and there are some columns in one database that are not the same length as those in the Oracle database. Could that be where the problem is located?
Thanks
Robin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Parse?