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



Home Answers Viewqa JSP-Servlet Extracting table from Access Database to Servlet

Have Programming Question? Ask it here!
 
 
 


Saakshi Dikshit
Extracting table from Access Database to Servlet
0 Answer(s)      a year and 3 months ago
Posted in : JSP-Servlet


Sir, I have a table with 4 field deptid, headid, normalexpend and projectexpend. Now I have to display a consolidated data where sum of normal_expend under particular head for all depts need to be displayed. For ex. dept d1 has spend 400 under head h1. dept d2 has spend 500 under h1. So the output under Head h1 on result page should show 900. I have written the query as : Select sum(h1) from expend where head_id="h1". The problem is that I have 20 heads and 10 depts which means I'll have to write this query around 30 times.

'Statement stat=con.createStatement(); ResultSet res=stat.executeQuery("select SUM(ne) from expenditure1 where headid=H1"); while(res.next()) { A_n = res.getInt(1); }'

I'm querying the data like this so does this mean i have to write the set of statements given above for all 20 heads. What is the correct method of doing this please somebody explain me.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Extracting table from Access Database to Servlet
Extracting table from Access Database to Servlet  Sir, I have a table with 4 field deptid, headid, normalexpend and projectexpend. Now I have... show 900. I have written the query as : Select sum(h1) from expend where head_id
display data from a table in Access Database in a HTML page
display data from a table in Access Database in a HTML page  how to display data from a table in Access Database in a HTML page in a Java Program
Advertisements
how to display a table from database using servlet
how to display a table from database using servlet  how to display a table with values from servletpage   Hi Friend, Please go through the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
to get picture from ms access database by jsp-servlet....
to get picture from ms access database by jsp-servlet....  I have inserted a picture in ms access data base,,,how we can retrieve that picture by using jsp
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  Hi all my Friends I have below code which insert a picture into M.S. Access Database But i m still not able to open this picture through Java using M.S. Access
ACCESS DATABASE FROM HTML
ACCESS DATABASE FROM HTML  I want to access sql 2008 database in html page without help of ADODB connection.. because if access through ADODB means there is a security problem. so, Access database in html page(client side
Extracting variable from jsp
Extracting variable from jsp  how to Write a java program which will be extracting the variables and putting them in an excel format?   The given code allow the user to enter some fields and using the POI API
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
Extracting equation from any document
Extracting equation from any document  how can i extract equation from any word document?   Hello Friend, If you want to extract data from the word file, then visit the following link: Extract data from word document
applet connected to table in MS Access database
applet connected to table in MS Access database   i have connected my java code with the MS access database and this is my code, can anyone tell me...()); } } //retrieve data from table COFFEES static void retrieveData() { try
How to access (MySQL)database from J2ME?
How to access (MySQL)database from J2ME?  I am new to J2ME. I am using NetBeans. Can anyone help me? How to access (MySQL)database from J2ME? ( I search a lot I found that there is need to access database through servlet
code for insert the value from jsp to access database
code for insert the value from jsp to access database  code for insert the value from jsp to access database
how i conditional access the data from database using combo box. - JSP-Servlet
how i conditional access the data from database using combo box.   i... access the data from database when i select class 11 0r 12. Here is JSP file...="+cla+"&&from_year="+y1+"&&to_year="+y2+"&&school="+sch); alert(sch+" "+cla+ " "+y1
Upload csv or .xlsx file from JSP form to Database Table using servlet
Upload csv or .xlsx file from JSP form to Database Table using servlet  dear sir, i need the Servlet code that reads the .xlsx or CSV excel file and stores it into the oracle database table. Sir Its very Urgent I have
jfreechart display from access database data.
jfreechart display from access database data.  I have made a database... to retrieve the data from the access database using prepared statement and then display... is to be done in a servlet.. Note that it is a access made database. How can I
jfreechart displaying chart from access database
jfreechart displaying chart from access database  I have these 2 codes. array.java----in which i retrieve the values from the database . import... javax.servlet.http.HttpServletResponse; /** * * @author AARUSHI */ class database { int roll; String
data insertion from xml file to database table
data insertion from xml file to database table  Hi all, I have data in the XML file. I need to insert it into table in the database using servlet. so please reply me . ThankYou
Extracting position of a particular string from a PDF
Extracting position of a particular string from a PDF  I have a pdf form. I want to knw the exact position(location) of a particular string of that form. Using iText I have extracted all the string from the PDF form, but nt able
retreiving data from microsoft access database
retreiving data from microsoft access database  How can i retrieve data from microsoft access when i have select the vaules in combo box and text box. When i select these values... i want to retrieve the corresponding columns
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
Access all the fields from table through JSP
Access all the fields from table through JSP...;/head> <body> <h2>Data from the table 'stu_info' of database... data from the specified table. Before running this java code you need
How To Insert A New Record to MS Access table database in GUI
How To Insert A New Record to MS Access table database in GUI  Hello... that involves inserting a record into a 6-column table in my MS Access database table. I'm..._UPDATABLE); String sql = "select * from DonorTable"; rs
how to use String tokenizer on table that is retrieved from database using jsp servlet
how to use String tokenizer on table that is retrieved from database using jsp servlet  Query:Table---- mysql> select pid,medicinename,dose,day,qty from medicinedetails2 where pid=15
Deleting a Table from Database
Deleting a Table from Database   .... In this section we are describing, how to delete a table from database using java methods. Java provides the facility for deleting a specific table from a given database
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
Retrieve image from database using Servlet
Retrieve image from database using Servlet     ... that connects to the MySQL database and retrieves the image from the table. After... applications that retrieves the image from database. You can use this type
Delete a Column from a Database Table
Delete a Column from a Database Table   ... to delete a column from a database table. We are not going to create a new table... a column from a database table then we have been provided with the  database
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... database i have attributes pH, phosphate, ....... month, year......... so its
Fetch user records from a table in database
Fetch user records from a table in database  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from
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
Select data from Table in Database
Select data from Table in Database   ... the selected data from table in database. The select query in the database retrieve...; in simple select statement is given below select column name from table
Deleting All Rows From the database Table
From the database Table      ... helps us to write on the browser. To delete all the rows from our database table... the PreparedStatement object. If the rows has been deleted from the database table
Select Employee and display data from access database in a jtable
Select Employee and display data from access database in a jtable  I... name of the customer is stored in a access database. Below is how it should... a employee's name from a comboBox and the jtable will be filled with all
Upload Excel into Database Table Using SERVLET - JSP-Servlet
Upload Excel into Database Table Using SERVLET  Hi i hava sitution that upload .xls file into database table which has same coloumn names... in database table are NAME,ID,SAL. please help me to upload that excel using
Add Items in JComboBox from Access Database - Java Beginners
Add Items in JComboBox from Access Database  Heelo Sir I want To add ittem in JComboBox which is stored in Access Database. plz Help Me Sir Database Column name -Course Items -MBA,MCA,MBA IT,MBA FINANCE I want Load Database
Updating Ms Access Database using jsp - JSP-Servlet
Updating Ms Access Database using jsp  Hi I am new to jsp and I am trying to update a record in an access database. I only want to update part... a table product(prod_id,prod_name,quantity,price) and try the following code
Deleting All Rows from a Database Table
Deleting All Rows from a Database Table   ... database table, now we have to delete all the rows from the table. This section describes for deleting all rows from a specific database table. Deleting all rows
Spring Security Authorized Access with Customized Login from Database
Spring Security Authorized Access with Customized Login from Database... stored in database table. For Spring Security authorized access using auto... check user authenticity using customized login from database table(in spring
How to search the table name in MS SQL Database 2005 from application
How to search the table name in MS SQL Database 2005 from application  How to search the table name in MS SQL Database 2005 from application from our helpdesk application? application might be in html
Deleting Blob Data from Database table using servlet
Deleting Blob Data from Database table using servlet In this section, we will discuss about how to insert a blob data into a database table. A Blob stores a binary large object in the database table's row. Blob object
How to retrive database information using servlet and disply in table format in browser
How to retrive database information using servlet and disply in table format in browser  Hi, any one send code how to retrive the data base information in table format in web browser
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 format. If you want to access the data from a table then you need to use some
dynamic retrivel of data from mysql database in table format at jsp
dynamic retrivel of data from mysql database in table format at jsp  ... the data from database and display it as table format in jsp... For example, i have... of A1 should be retrived from database and display it in the respective textbox
How to delete the row from the Database by using servlet
then the user data to be delete from the database table. Assume in Database table have...: Delete row from database using servlet   In that link solution... details (HTML Page, Database table, Servlet Program) see this link link text
retriving image from database - JSP-Servlet
retriving image from database  how to retrive image from mysql database by using servlet programming  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/retreiveimage.shtml Thanks
how to display values from database into table using jsp
how to display values from database into table using jsp  I want to display values from database into table based on condition in query, how... the values from database based on the bookname or authorname entered must be display
getting values from database - JSP-Servlet
getting values from database  I tried the following code abc.html... JSP code separately.If it will not display database values then try your code in Servlet. Thanks
Fetching database field from servlet to jsp page ?
Fetching database field from servlet to jsp page ?  Hello Java... field. I wanted to pass some of the database field from servlet to jsp... (i am opening my database in servlet init() method ) how to pass rs.getString(8
how to delete specified coloumn from database(MS Access) by using windows application
how to delete specified coloumn from database(MS Access) by using windows application  how to delete specified coloumn from database(MS Access) by using c# windows application
Count Rows from a Database Table
Count Rows from a Database Table       After creating a database table, if we want... need to pass a table name from the given database in the query and the rows
 

 

 

DMCA.com