Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Retrieving value from multiple table in database
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Prakash
Retrieving value from multiple table in database
1 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners


Hi fnds, I want to maintain the financial database of 20 users for 1 year and update the details in jsp page.. so i have decided to maintain the details based on month (because the other modules in this project needs the output based on month) .. I have created 12 tables with table name - month1,month2,....,upto month12.. each table contains the data like name,amount,paiddate and balance of individual users... i want to calculate the balance of individual users.. for eg, for the user A, let the balance at month1 is 1000... if the user A balance at month2 is 2000, i want to add those balance and display it as 3000 at jsp page for month2.. pls its urgent frnds...


Advertisement
View Answers

August 29, 2012 at 6:11 PM


Use the given query

SELECT uname, SUM(balance) as sm FROM (
   SELECT * FROM month1
   UNION ALL
   SELECT * FROM month2
   UNION ALL
   SELECT * FROM month3
) AS somealias 
GROUP BY uname;


Related Tutorials/Questions & Answers:
Retrieving value from multiple table in database
Retrieving value from multiple table in database  Hi fnds, I want to maintain the financial database of 20 users for 1 year and update the details... created 12 tables with table name - month1,month2,....,upto month12.. each table
related retrieving value from oracle database
related retrieving value from oracle database  how we get the value from database in the given textbox
Advertisements
related retrieving value from oracle database
related retrieving value from oracle database  how we get the value from database in the given textbox
Retrieving the Image from a database Table
Retrieving the Image from a database Table Consider a case where we want... to retrieve the image from the database table. You can do it very easily after... from the database table our java program need to make a connection
check radio button on retrieving the value from database.
check radio button on retrieving the value from database.  HI i am new to jsp.In my applcation i having a problem. I am retrieving user payment from... information from database the i want to show cash radio button checked.How can i do
Retrieve multiple data from database into Table.....
Retrieve multiple data from database into Table.....   hi........... I want to Retrieve multiple data from database into Table but i am not able to.... i am only able to retrieve one value not more than that. means in my
Retrieving attribute value from XML
Retrieving attribute value from XML  I have an XML as below to parse...; ..... But am not able to fetch the value of LoadTicketId attribute. My code...-values-from-a-nodel.shtml http://www.roseindia.net/xml/dom/GetData.shtml Thanks
retrieving xml document from database
retrieving xml document from database  Hi Guys, I want to retrieve the xml document stored in the database on to a jsp page using jdbc/odbc connnection.Please help me in implementing this feature. Thank You Madhu
Retrieving All Rows from a Database Table
Retrieving All Rows from a Database Table   ... from a database table. You know that table contains the data in rows and columns... APIs and methods. See brief descriptions for retrieving all rows from a database
use data from database table as hyperlink value - JSP-Servlet
use data from database table as hyperlink value  I'm creating a web page that allows user to search my database. The page will display partial results of my database, then the first column of the resultset was converted
getting problem in storing & retrieving value in database
getting problem in storing & retrieving value in database  Hello everyone i am doing a project where my back end is ms access & i want to store value like 5353250214 so if i store it as long int in access it wont take it &
retrieving of value from excel file - JSP-Servlet
retrieving of value from excel file  Dear sir, Thanks for sending a code now i am getting a particular column value i.e EmailId column... onl single column value i.e EmailId values to send for a different employees
retrieving of value from excel file - JSP-Servlet
retrieving of value from excel file  Dear sir, Thanks for sending... this message to all the employees when i upload a file then it fetch a data from that excel sheet i.e this matter will take a para meter values from the excel
retrieving of value from excel file - JSP-Servlet
retrieving of value from excel file  Dear sir, Thanks for sending... this message to all the employees when i upload a file then it fetch a data from that excel sheet i.e this matter will take a para meter values from the excel
Retrieving Data from Database to fill Combo Box
Retrieving Data from Database to fill Combo Box  Sir, I have a JSP Page with a combo box and a label. I have a database that has two fields id... displaying path that is stored in the database but not the image itself. Kindly
Retrieving JTree structure from database
Retrieving JTree structure from database   ... in the program below, access the database and retrieve the data from the table. This data... the steps required to create tree retrieving the data from the database. Here
retrieving newly added records from mssql database and display in a jsp
retrieving newly added records from mssql database and display in a jsp ... from mssql database table and display those records in a jsp.And i have to delete... from the table and display in jsp and so on.This should be done forever(here we
Retrieve Value from Table - Hibernate
Retrieve Value from Table   Hai friend, I need help, How can i retrieve values From database using hibernate in web Application. As I new to hibernate I couldn't find solution for this problem.. Can anyone help please.. 
Retrieving Tables from a Database
Retrieving Tables from a Database   ... a table and create a table in the database. This section provides you a facility for retrieving tables from a specific database through an example. In relational
Retrieving Information From Database in JSF Framework - Development process
Retrieving Information From Database in JSF Framework  Requirement... it should get redirect to selcet.jsp in which there will be table having contents retrieved from database. see how the datatable in select.jsp should be http
Subtract a value in the database from java
Subtract a value in the database from java   Hi, i want to know how to subtract a value on a database. im using JDBC connection from access and i want to decrement the value of table "quantity" of 1 each time it passes a loop my
retrieving data from database to the textbox depending upon the id in jsp
retrieving data from database to the textbox depending upon the id in jsp  Hi, our project involves fetching of data from database into textbox depending upon another textbox value which is productid.First the id entered by us
get value from multiple textbox in jsp
get value from multiple textbox in jsp  how to get multiple textbox value in another jsp? If i using the following code <%for(int i=0;i<3;i++) {%> <td>name<input type="text" class="name" id="name">
The code for retrieving data from database into Drop Down List.
The code for retrieving data from database into Drop Down List.  <... to MySQL"); PreparedStatement pre = con.prepareStatement("select * from...// <% String value = request.getParameter("BookList"); pre
display multiple images from postgres database in jframe
display multiple images from postgres database in jframe  i just want to display multiple images on jframe by firing a query on postgres database
how to check dates while retrieving data from database
how to check dates while retrieving data from database  i want to update database record based on delivery date i have tried this query but it wont work b="update deliveryorder set prtnm='"+arr[1]+"',stn='"+arr[0]+"',sbston
how to insert list box in java script dynamically and elements retrieving from database like oracle
how to insert list box in java script dynamically and elements retrieving from database like oracle  Hi, how to dynamically increase size of list box in javascript when elements retrieving from database.. That is whenever I
retrieving data in to the dropdown box from postgresql database in core java
retrieving data in to the dropdown box from postgresql database in core... have selected '"+value+"' from ComboBox"); } }); f.add...=st.executeQuery("SELECT role_name from role WHERE dept_id=1234"); if(rs
retrieving from oracle database using jsp combo box
retrieving from oracle database using jsp combo box  hi this is my... name of the server has to display in the process name field from the oracle database please help on this i need code using servlets please help me . <
pint multiple images from blob database
pint multiple images from blob database  How to display multiple images using blob from mysql database. The program code is as below: <TABLE cellpadding="15" border="1" style="background-color: #ffffcc;"> <
graph generation using jfreechart and retrieving values from the database
graph generation using jfreechart and retrieving values from the database  I have made a database containing 4 subject marks and name and roll no. of students.The dsn name is chartdsn. I want to retrieve the data from the access
 

 

 

DMCA.com