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 JDBC and the fly likes Problem in Divison 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 » Databases » JDBC
Bookmark "Problem in Divison" Watch "Problem in Divison" New topic
Author

Problem in Divison

Sujay Nadkarni
Ranch Hand

Joined: Jul 03, 2008
Posts: 34

I found out the values and stored it in x and p.
Since x is the result of aggregate function it contains only one value. P contains multiple value.
Now I want to divide each value stored in p with x and insert it into the database. How do i do that?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


P contains multiple value.

No it doesn't, unless there is only one row returned by the SQL "Select mcap from Nifty". Otherwise it contains one value which you overwrite.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    5

DO NOT USE JDBC INSIDE OF JSP!


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Divison